Tutorial: Understanding the New Features of TLD Caching in JSPs
Example: Multiple Tag
Libraries and TLD Files in a JAR File
This section
assumes an example JAR file and presents an example of tag library packaging.
This is a situation where multiple tag libraries are packaged in a single
JAR file. The JAR file includes tag handler classes, tag-library-validator
classes, and TLD files for multiple libraries. The following shows the
contents and structure of the example JAR:
Key web.xml File Entries for Multiple-Library Example
This section shows the <taglib>
elements of the web.xml deployment descriptor. These map the
full URI values, as seen in the <uri> elements of the TLD files in
the previous section, to shortcut URI values used in the JSP pages that
access these libraries.
JSP Page taglib Directives for Multiple-Library
Example
This section shows the appropriate taglib
directives, which reference the shortcut URI values defined in the web.xml
elements listed in the preceding section.
The page basic1.jsp includes the following
directive: