JSTL stands for JSP Standard Tag Library. It provides the no. of tags used for iteration, condition checking, manipulating XML documents etc.
Advantages of JSTL:
- Code reusability.
- Scriplet tags are not needed.
Types of JSTL tags:
- JSTL Core Tags
- JSTL Formatting tags
- JSTL SQL tags
- JSTL XML tags
- JSTL Functions
1. JSTL Core Tags: These tags are used for iteration, condition checking, URL management etc. Core tags are most commonly used.
Syntax: <%@ taglib uri=”http://java.sun.com/jsp/jstl/core” prefix=”c”%>
2. JSTL Formatting tags: These tags are used for formatting the text, date, numbers etc.
Syntax: <%@ taglib uri=”http://java.sun.com/jsp/jstl/fmt” prefix=”fmt”%>
3. SQL tags: Theses tags are used for interacting with databases like Oracle, MySQL etc.
Syntax: <%@ taglib uri=”http://java.sun.com/jsp/jstl/sql” prefix=”sql”%>
4. XML tags: These tags are used forcreating and manipulating XML documents.
Syntax: <%@ taglib uri=”http://java.sun.com/jsp/jstl/xml” prefix=”x”%>
5. JSTL Functions: These function tags are mainly used for manipulating strings.
Syntax: <%@ taglib uri=”http://java.sun.com/jsp/jstl/functions” prefix=”fn” %>
JSTL (JSP Standard Tag Library) tutorial:
- JSTL (JSP Standard Tag Library) with example.
- JSTL Core Tags with example.
- JSTL c:out Core Tag with example.
- JSTL c:set Core Tag with example.
- JSTL c:remove Core Tag with example.
- JSTL c:catch Core Tag with example.
- JSTL c:if Core Tag with example.
- JSTL c:choose , c:when and c:otherwise Core Tags with example.
- JSTL c:import Core Tag with example.
- JSTL c:forEach Core Tag with example.
- JSTL c:forTokens Core Tag with example.
- JSTL c:url Core Tag with example.
- JSTL c:param Core Tag with example.
- JSTL c:redirect Core Tag with example.
- JSTL Formatting Tags with example.
- JSTL fmt:formatNumber Formatting Tag with example.
- JSTL fmt:parseNumber Formatting Tag with example.
- JSTL fmt:formatDate Formatting Tag with example.
- JSTL fmt:parseDate Formatting Tag with example.
- JSTL fmt:bundle Formatting Tag with example.
- JSTL fmt:setBundle Formatting Tag with example.
- JSTL fmt:setLocale Formatting Tag with example.
- JSTL fmt:timeZone Formatting Tag with example.
- JSTL fmt:setTimeZone Formatting Tag with example.
- JSTL fmt:requestEncoding Formatting Tag with example.
- JSTL Functions with example.
- JSTL fn:contains() function with example.
- JSTL fn:containsIgnoreCase() function with example.
- JSTL fn:startsWith() function with example.
- JSTL fn:endsWith() function with example.
- JSTL fn:escapeXml() function with example.
- JSTL fn:indexOf() function with example.
- JSTL fn:join() and fn:split() function with example.
- JSTL fn:length() function with example.
- JSTL fn:replace() function with example.
- JSTL fn:subString() function with example.
- JSTL fn:subStringAfter() function with example.
- JSTL fn:subStringBefore() function with example.
- JSTL fn:toLowerCase() function with example.
- JSTL fn:toUpperCase() function with example.>/br>
- JSTL fn:trim() function with example.