Attributes in JSP Custom TagThere can be defined too many attributes for any custom tag. To define the attribute, you need to perform two tasks:
Let's understand the attribute by the tag given below: Here m is the prefix, cube is the tag name and number is the attribute. Simple example of attribute in JSP Custom TagIn this example, we are going to use the cube tag which return the cube of any given number. Here, we are defining the number attribute for the cube tag. We are using the three file here:
OutputJSP Custom Tag attribute example with databaseLet's create a custom tag that prints a particular record of table for the given table name and id. So, you have to have two properties in the tag handler class. PrintRecord.javam.tldindex.jspOutputdownload this exampleNext TopicIteration Using Jsp Custom Tag |