What is Tag library descriptor (TLD)?


Interview questions

What is Tag library descriptor (TLD)?

<<Previous   Next>>
JSP - What is Tag library descriptor (TLD)? - Feb 03, 2009, 17:00 pm by Vidya Sagar

What is Tag library descriptor (TLD)?

The custom tags can be implemented or redistributed with tag handlers that are written in Java. These redistributable tags must be in a library called Tag Library Descriptor. The TLD file is an XML file. It contains the information about the tag library and about detailed description in the library. TLDs are handled by the container and also by the development tools of JSP that is to validate the tags.

The extension for the tag library file is .tld and must be packaged in the WEB-INF/ directory or in the /META-INF directory or subdirectory of the tag library packaged in a JAR file or subdirectory of the WAR file. The tag library will be automatically generated by the web container if the file is packaged in /WEB-INF/tags or in a subdirectory.

A tag library file must begin with a root element ‘taglib’ which specifies the schema and the JSP version. For Ex:

<taglib xmlns=http://java.sun.com/xml/ns/j2ee
jsptaglibrary_2_0.xsd" version=”2.0”> 

<<Previous   Next>>

Write your comment - Share Knowledge and Experience


Latest placement tests
Latest links
Latest MCQs
» General awareness - Banking » ASP.NET » PL/SQL » Mechanical Engineering
» IAS Prelims GS » Java » Programming Language » Electrical Engineering
» English » C++ » Software Engineering » Electronic Engineering
» Quantitative Aptitude » Oracle » English » Finance
Home | About us | Sitemap | Contact us