About TLD Files

See Also

You can implement custom tag handlers for JSP files using either Java classes or tag files. A tag library can contain either type of tag handler or it can contain both types. When you bundle a tag library in a JAR file, you must include a TLD (tag library descriptor) file. A JSP container uses the TLD file to associate a URI with a tag library and its tags.

The TLD file contains:

You use the tag element to add a Java class tag handler to a TLD. You use the tag-file element to add a tag handler implemented in a tag file to the TLD.

The IDE creates a TLD file when you use the New wizard to create a class-based tag library. You can then use the Taglib Customizer dialog boxes to edit the elements of the TLD file. You can also edit the TLD file directly in the Source Editor. You will need to do this for tag-file elements and certain advanced features, including adding validator classes. If you edit the TLD file directly, no validation is performed on your edits.

warning  Only TLD files that conform to JSP 1.1 or 1.2 specifications can be edited in the customizer. Other versions are treated as XML files and must be edited in the Source Editor. When you use the New wizard to create a tag library, the IDE creates a 1.2 TLD file.
See Also
About Tag Libraries
Creating TLD Files

Legal Notices