JSP Tag Libraries

Скачать в pdf «JSP Tag Libraries»

B.3 JSP1.2 and the new TLD entries


One of the additions to JSP1.2 is an extended TLD structure that includes the JSP1.1 elements and adds new elements to serve three goals:


■    improved support for development and management tools


■    support for new features in the servlet API2.3


■    support for the extended verification phase added to JSP1.2.


Let’s look now at additions to the TLD structure, starting again with the root taglib element and ending with the attribute element.

B.3.1 New taglib elements


The elements added beneath the taglib element are presented in
table B.4.


Table B.4 New elements used beneath the taglib element.


Element


Description


Mandatory


display-name


Short descriptive name to be used by tools to represent the library.


No


small-icon


Icon to be used by tools to represent the library.


No


large-icon


Icon to be used by tools to represent the library.


No


validatorclass


Tag library validator class that may walk over and check the XML representation of the JSP file.


No


listener


Event listener that can listen to events associated with the application or the users sessions.


No. A tag library can have zero or more event listeners associated with the application events.

As you can see in table B.4, three main additions to the global tags enclosed by the taglib element exist:


1 The display-name, small-icon, and large-icon elements provide a better way to present the library in development and documentation tools

Скачать в pdf «JSP Tag Libraries»