Adding the Tag Library Descriptor (TLD) file

In order to implement custom JSP tags, you must add the Tag Library Descriptor (TLD) file (taglib.tld) to your project.

Procedure

  1. Add the independent tag library descriptor, taglib.tld to your WEB-INF folder:
    1. In the Enterprise Explorer view of the Web perspective, select the WebContent/WEB-INF folder in your web project.
    2. Right-click the WEB-INF folder and select Import.
    3. Click General > File System and then click Next.
    4. In the File System page of the Import wizard, click Browse to select the directory from which you want to import your independent tag library descriptor, taglib.tld.
    5. Select the tld file from the tree viewer on the wizard.
    6. Click Finish to add your independent tag library to your WEB-INF folder.
  2. Add the custom tag library to the web project:
    1. In the Enterprise Explorer view of the Web perspective, right-click the web project and select Import.
    2. Click File System > Next.
    3. In the File System page of the Import wizard, click Browse to select the directory from which you want to import your custom tag library.
    4. Select the library from the navigation tree in the wizard
    5. Click Finish to add your custom tag library to your web project.

What to do next

After you add the TLD file to your project, you can add a taglib directive to your JSP file.
Icon that indicates the type of topic Task topic
Timestamp icon Last updated: July 17, 2017 21:58

File name: taddtaglib.html