Class 2 |
Intermediate Java 30-IT-397 |
|
Tag Library Descriptor in Depth
-
The tag library descriptor is an XML file. Much of the text is identical
among tlds, so it is best to copy and pase from an existing tld.
-
Start the collection of tags with the <taglib> tag.
-
Then, each individual tag should have a <tag> tag.
-
Within that tag, have these four elements:
-
<name> is the name of the tag; the part that comes after the
prefix and the colon in your jsp.
-
<tagclass> is the location of the tag handler, comprised of
the package and the class name. This is the magic of how the JSP
container is able to find the tag handler class.
-
<info> (Optional) is simply a short description.
-
<bodycontent> (Optional) For tags without bodies, this should
be EMPTY.
-
All of the above tags should be closed.
See the previous example.
Tag Attributes

Created by: Brandan Jones
December 17, 2001