Jakarta Standard Tag Library
| Industry | Software development |
|---|---|
| Founded | May 8, 2006 |
| Parent | Java Community Process |
The Jakarta Standard Tag Library (JSTL, previously known as the JavaServer Pages Standard Tag Library) serves as an integral part of the Java EE Web application development ecosystem. It extends the capabilities of the JSP specification by offering a uniform set of tags designed to simplify routine operations such as XML manipulation, conditional processing, database interactions, iteration, and internationalization support.
Specification
The development of JSTL occurred under the auspices of the Java Community Process (JCP) as part of Java Specification Request (JSR) 52. The initial release of JSTL 1.2 was made available on May 8, 2006, with a subsequent update to version 1.2.1 issued on December 7, 2011.
Additional JCP JSRs associated with JSP tag libraries include:
- JSR 128: JESI – JSP Tag Library for Edge Side Includes (currently inactive)
- JSR 267: JSP Tag Library for Web Services
General Responsibilities
JSTL facilitates embedding logic directly within a JSP without embedding Java code explicitly. This approach encourages cleaner codebases and fosters a clear division between the application’s business logic and its presentation layer.
Tag Library Descriptor
The JSTL package comprises six distinct Tag Library Descriptors (TLDs):
- Core library: delivers essential tags such as and .
- Formatting library: supports features related to internationalization.
- Database library: provides tags designed for database querying and updates.
- XML library: enables efficient processing of XML content.
- Functions library: contains a set of utility functions.
- Translation-time validators (TLVs): impose constraints on scripting elements and tag usage during JSP compilation.
Each TLD is defined as an XML document and is case-sensitive, ensuring rigorous compliance during JSP page creation.
Core Library
Among these, the core library is the most extensively utilized, encompassing fundamental tags for control flow operations like conditional branches and loops. It requires inclusion via a taglib directive specifying its URI and associating it with a prefix, commonly c. This library significantly simplifies JSP development by standardizing iteration and conditional constructs.