Show TOC

Procedure documentationDeveloping TLD Files Locate this document in the navigation structure

 

Tag Library Definition (TLD) files are XML files that describe groups of custom tags with their name, implementation class, body content, attributes and variables. They can also describe listeners and tag library validators.

Prerequisites

You have a Dynamic Web Project.

More information: Creating Dynamic Web Projects.

Procedure

1. Create the TLD File
  1. In the Project Explorer view, select the Dynamic Web Project.

  2. In the context menu, choose NewOtherWebWeb 2.5TLD.

  3. Choose Next.

  4. Specify the TLD file name and choose Next.

  5. Define a short name for the TLD and specify the version of the tag library. Choose Next.

  6. If you want the created TLD file to be described automatically in the web.xml of the project, mark the respective option and enter the tag library URL.

  7. Choose Finish.

2. Configure the TLD File

Configuring the content of the TLD file is done using its multipage editor.

In the Elements tab, the base structure of a TLD file is displayed as a tree. You can add child elements to the tree, and configure the attributes of elements.

To add a child element, choose the parent element and use the New Child option in the context menu. To remove a child element, choose the element and use the Remove option in the context menu.