JavaServer Pages Standard Tag Library-
it’s a standard library of ready made tags.
Classification of jstl-
1- Core Tags
2- Formatting Tags
3- Sql Tags
4- Xml tags
5- Jstl functions
Tags | Description | Example |
---|---|---|
Core Tags | These tags are used to control the flow and structure of a JSP page. Examples include <jsp:include> and <jsp:forward> . | <jsp:include page="header.jsp" /> |
Formatting Tags | These tags are used to format and display data on a JSP page. Examples include <c:out> and <fmt:formatNumber> . | <c:out value="${user.name}" default="Guest" /> |
SQL Tags | These tags are used to interact with a SQL database. Examples include <sql:query> and <sql:update> . | <sql:query var="result" dataSource="jdbc/myDB">SELECT * FROM users</sql:query> |
XML Tags | These tags are used to interact with XML data. Examples include <x:parse> and <x:out> . | <x:parse xml="data.xml" var="data" scope="page" /> |
JSTL Functions | These functions provide commonly used operations such as string manipulation, mathematical operations and conditional evaluations. Examples include fn:length() and fn:substring() . | <c:out value="${fn:length(user.name)}" /> |