What is "jstl"

JSTL (JSP Standard Tag Library) is a library that extends and facilitates the use of Taglibs often used in prototyping JSP applications.

The installation will depend on your desktop, but consists of placing the file jstl-x.x.jar in the briefcase /WEB-INF/lib of your project and declare the taglib you want to use in your JSP, for example the taglib core declaration:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

This way it should already be possible to use basic core iterations and functionality. Note that to use other library features, you must import the taglib for the functionality. At this link it is possible to find the technical documentation of each of them.

Below is the list of some of the main functionalities:

  • Core
    • <c:out>, <c:set>, <c:if>, <c:choose>, <c:when>, <c:otherwise>, <c:forEach>, <c:url>
  • Formatting
    • <fmt:formatNumber>, <fmt:formatDate>, <fmt:parseNumber>
  • JSTL functions (EL)
    • fn:contains(), fn:indexOf(), fn:length(), fn:replace(), fn:split(), fn:substring(), fn:toLowerCase(), fn:trim()

Related pages