Java Reference
In-Depth Information
This text will not define every attribute associated with the tag library descriptor. This
would be beyond the scope of this topic. To find more information on tlds you can
look at the JSP specification.
The following code snippet contains a simple tld with one tag defined named hello :
<?xml version=”1.0” encoding=”ISO-8859-1” ?>
<!DOCTYPE taglib
PUBLIC “-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN”
<!-- a tab library descriptor -->
<info>DJS Tag Library</info>
The tld breaks down into three main sections. The first is the document description section.
This section contains the xml version and the Document Type Definition (DTD) that defines
the document type of the tld. It will most often not change.
The second section, a child of the taglib entry, describes the tag library. The attributes defined
in this section are optional. Some of the entries in this part of the document define the version
of the tag library, define JSP version used by the tag library, and describe general information
about the tag library.
The last section is the most important. It is the tag section, also a child of the taglib entry.
This section describes each defined tag and the handlers that are associated with it. Table 19.1
defines the subelements available for the tag entry.
T ABLE 19.1
Subelements Associated with the tag Entry
The unique name of the tag
The tag handler class
The optional class used to describe extra information about a tag
Search WWH ::

Custom Search