29.01.2013 Views

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The TLD contains two main elements, taglib and tag. The taglib element defines<br />

details of the tag library as a whole. It also contains a tag element for each<br />

custom tag within the library. Table 9-1 defines possible subelements within a<br />

taglib element.<br />

Table 9-1 Subelements of the TLD element<br />

Sub-element Description<br />

Defines the version of this tag library.<br />

Defines the version of the JSP<br />

specification that the tags within the library<br />

need.<br />

Defines a name for the tag library.<br />

Defines a unique reference to the tag<br />

library.<br />

A String describing the contents of the tag<br />

library.<br />

A tag element defines the details for a<br />

particular custom tag in the library.<br />

Of these, the URI element is the most important. It ties the taglib directive defined<br />

within a JSP page with a specific tag library. Alternatively, the URI may be<br />

defined in the web.xml file for the Web application.<br />

The tag element defines most of the information needed by the Web container for<br />

a particular tag. The subelements of the tag element are listed in Table 9-2.<br />

Table 9-2 Sub elements of the TLD element<br />

Sub element Description<br />

The name by which the tag will be referred<br />

to in a JSP page.<br />

The tag handler class.<br />

If the tag has a TEI (TagExtraInfo), then its<br />

class is referred here.<br />

Attempts to define the contents of the tag<br />

body.<br />

A sting describing the function of the tag.<br />

The attribute element defines the details<br />

of a tag attribute.<br />

284 <strong>IBM</strong> <strong>WebSphere</strong> <strong>Application</strong> <strong>Server</strong> - Express V5.0.2 Developer Handbook

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!