Creating a Tag Library Descriptor

See Also

A tag library consists of:

The following steps show how to create a TLD in a web application. After you create the TLD, use code completion in the Source Editor to define the tag library descriptor's properties.

To create a TLD in a web application:

  1. In the Projects window or Files window, right-click the project node.
  2. From the pop-up menu, choose New > Other.
  3. Under Categories, select Web. Under File Types, select Tag Library Descriptor. Click Next.
  4. Type the name of the TLD file. Do not add the .tld extension, unless it is part of the name.
  5. Type the folder where your TLD files are housed. By default, it is created in WEB-INF/tlds. If you create TLD files outside the WEB-INF subfolder, but still within the web folder, you must map them in your WEB-INF/web.xml file. You can use the Source Editor to modify the URI.
  6. Type the prefix to be used within your JSP file. By default, the prefix is the same as the name of your TLD file. You can use the Source Editor to modify the prefix.
  7. Click Finish.

The IDE creates a TLD file that conforms to the JSP2.0 specification in J2EE 1.4 projects or to the JSP1.2 specification in J2EE1.3 projects. The IDE supports both types of TLD files. That is, you can edit them using code completion in the Source Editor.

For more information about creating and using tag libraries, see the JavaServer Pages Specification available at

See Also
About Tag Libraries
Editing a Tag Library Descriptor
Creating a Tag Handler

Legal Notices