The document contains code snippets demonstrating the use of various JSTL core and function tags to output and manipulate text values. Some key actions shown include:
- Outputting text using <c:out>
- Importing content from an external URL using <c:import>
- Setting and removing variables in different scopes using <c:set> and <c:remove>
- Conditionally displaying content using <c:if>, <c:choose>, <c:when> and <c:otherwise>
- Iterating over values using <c:forEach> and <c:forTokens>
- Generating URLs and redirecting using <c:url> and <c:redirect>
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
34 views4 pages
JSTL
The document contains code snippets demonstrating the use of various JSTL core and function tags to output and manipulate text values. Some key actions shown include:
- Outputting text using <c:out>
- Importing content from an external URL using <c:import>
- Setting and removing variables in different scopes using <c:set> and <c:remove>
- Conditionally displaying content using <c:if>, <c:choose>, <c:when> and <c:otherwise>
- Iterating over values using <c:forEach> and <c:forTokens>
- Generating URLs and redirecting using <c:url> and <c:redirect>
<p>Your income is : <c:out value="${income}"/></p> <c:choose> <c:when test="${income <= 1000}"> Income is not good. </c:when> <c:when test="${income > 10000}"> Income is very good. </c:when> <c:otherwise> Income is undetermined... </c:otherwise> </c:choose>
<c:set value="10" var="num"></c:set>
<c:choose> <c:when test="${num%2==0}"> <c:out value="${num} is even number"></c:out> </c:when> <c:otherwise> <c:out value="${num} is odd number"></c:out> </c:otherwise> </c:choose>