Tag Library Descriptor
A Tag Library Descriptor , also called TLD , is used in the Java programming language as a meta description file to define your own markup elements ( tags ) when developing web applications using JavaServer Pages (JSP).
For this purpose, own elements, including optional attributes, are defined XML- compliantly via the TLD file and associated with the corresponding class libraries executed on the server side. These class libraries are also referred to as taglibs and are used for the consistent separation of code and display logic (encapsulated by the taglibs) ( model-view-controller principle ).
In comparison to this, script languages such as Perl , PHP or ASP code and descriptive markup elements are mixed, which can complicate the maintenance of the program or make the use of a template engine necessary.
TLDs are specified via a document type definition (DTD) against which the XML parser validates.
See also
- The standardized JavaServer Pages Standard Tag Library (JSTL) provides elementary tag libraries.
- The Apache Taglibs project provides extensive libraries of tags.
- Struts is a framework for developing web applications that also provides its own tag libraries.