JSTL Core Tags List

JSTL core tags provide support for iteration, conditional logic, catch an exception, URL, forward or redirect response, etc.
All JSP Examples at JSP Source Code Examples.
Let's list out all the JSTL core tags with descriptions.

JSTL Core Tags List

<c:out> - Like <%= ... >, but for expressions.
<c:set > - Sets the result of an expression evaluation in a 'scope'
<c:remove > - Removes a scoped variable (from a particular scope, if specified).
<c:catch> - Catches any Throwable that occurs in its body and optionally exposes it.
<c:if> - Simple conditional tag which evalutes its body if the supplied condition is true.
<c:choose> - Simple conditional tag that establishes a context for mutually exclusive conditional operations, marked by and .
<c:when> - Subtag of that includes its body if its condition evalutes to 'true'.
<c:otherwise > - Subtag of that follows the tags and runs only if all of the prior conditions evaluated to 'false'.
<c:import> - Retrieves an absolute or relative URL and exposes its contents to either the page, a String in 'var', or a Reader in 'varReader'.
10 <c:forEach > - The basic iteration tag, accepting many different collection types and supporting subsetting and other functionality .
11 <c:forTokens> - Iterates over tokens, separated by the supplied delimiters.
12 <c:param> - Adds a parameter to a containing 'import' tag's URL.
13 <c:redirect > - Redirects to a new URL.
14 <c:url> - Creates a URL with optional query parameters

How to Use JSTL Core Tags?

To use JSTL core tags, we should include below a line of code in our JSP page:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
All JSP Examples at JSP Source Code Examples.

Comments