
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What are the standard attributes that should be passed to a custom tag in a JSP page?
Consider including the following properties for an attribute −
S.No. | Property & Purpose |
---|---|
1 | name The name element defines the name of an attribute. Each attribute name must be unique for a particular tag. |
2 | required This specifies if this attribute is required or is an optional one. It would be false for optional. |
3 | rtexprvalue Declares if a runtime expression value for a tag attribute is valid |
4 | type Defines the Java class-type of this attribute. By default, it is assumed as String |
5 | description Informational description can be provided. |
6 | fragment Declares if this attribute value should be treated as a JspFragment. |
Following is the example to specify properties related to an attribute −
..... <attribute> <name>attribute_name</name> <required>false</required> <type>java.util.Date</type> <fragment>false</fragment> </attribute> .....
If you are using two attributes, then you can modify your TLD as follows −
..... <attribute> <name>attribute_name1</name> <required>false</required> <type>java.util.Boolean</type> <fragment>false</fragment> </attribute> <attribute> <name>attribute_name2</name> <required>true</required> <type>java.util.Date</type> </attribute> .....
- Related Questions & Answers
- I want to create a custom tag in JSP. How to write a custom tag in JSP?
- What are various attributes Of page directive in JSP?
- How can I create custom tag in JSP which can accept attribute from parent jsp page?
- What is a page object in JSP?
- What is a page directive in JSP?
- What HTML5 tag should be used for filtering search results.
- How to specify that an option should be pre-selected when the page loads in HTML?
- How to write a comment in a JSP page?
- What is JSP page redirection?
- How can we decide that custom exception should be checked or unchecked in java?
- How to write a for loop in a JSP page?
- How to write a while loop in a JSP page?
- How to write a switch statement in a JSP page?
- What are the attributes of a Perfect Capital Market?
- What should be the Python class order in a file?
Advertisements