You can use JSP syntax in tag files to create custom tags. Tag files can have the following extensions:
All tag files that are under WEB-INF/tags are available for use by the JSP files in that web module. Each directory under WEB-INF/tags represents a separate tag library. You use the tagdir attribute in a taglib directive to specify the location of the tag library directory. For example:
<%@ taglib prefix="x" tagdir="/WEB-INF/tags/xtremeLib" %>
Tag files can also be bundled with a TLD file into a JAR file. In this case, you must put the JAR file in the WEB-INF/lib directory and use it in the same manner as a class-based tag library.
The IDE recognizes tag files, but it does not provide wizard support
for creating new tag files. To create a tag file from the IDE, choose File New
from the main menu, expand Other, and select Text File. Be sure to enter
the correct extension.
See Also | |
---|---|
Using Tags in JSP Files About Tag Libraries About JSP Syntax |