JSTL fmt:formatNumber Formatting Tag

The JSTL <fmt:formatNumber> Formatting Tag is used for formatting the numbers, currencies and percentages. Syntax: <fmt:formatNumber value=”val” otherattributes /> fmt:formatNumber tag attributes: Attribute Description Required value It specify the numeric value to display. Yes type NUMBER, CURRENCY, PERCENT No pattern It specify a custom formatting pattern for the output.. No currencyCode Currency code (for type=”currency”). … Read more

Categories JSP

JSTL Formatting Tags

The JSTL Formatting tags are used for formatting the text, date, numbers etc. Syntax: &lt JSTL Formatting Tags are given below: 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 … Read more

Categories JSP

JSTL c:redirect Core Tag

The JSTL <c:redirect> Core Tag is used to redirect the client’s browser to the specified url. It supports the <c:param> tag. Syntax: <c:redirect url=”relUrl” /> c:redirect tag attributes: Attribute Description Required url It specify the URL to redirect the user’s browser to. Yes context / followed by the name of a local web application. No … Read more

Categories JSP

JSTL c:param Core Tag

The JSTL <c:param> Core Tag is used with <c:url> and <c:redirect> tags to add the parameters. Syntax: <c: param name =”paramName” value=”paramValue” /> c:param tag attributes: Attribute Description Required name It specify the name of the request parameter to set in the URL. Yes value It specify the value of the request parameter to set … Read more

Categories JSP

JSTL c:url Core Tag

The JSTL <c:url> Core Tag is used to format or encode a url into a string variable. This variable can be used anywhere in the jsp instead of using url directly. Syntax: <c:url value=”Url” var=”varNmae”/> c:url tag attributes: Attribute Description Required value It specify the base URL. Yes context / followed by the name of … Read more

Categories JSP

JSTL c:forTokens Core Tag

The JSTL <c:forTokens> Core Tag is used for the iteration process. It breaks the string into tokens by using delimiter and then iterate through tokens. Syntax: <c:forTokens items="string" delims="delimiter" var="varName"> //block of statemtnts </c:forTokens><c:forTokens items="string" delims="delimiter" var="varName"> //block of statemtnts </c:forTokens> c:forTokens tag attributes: Attribute Description Required items Information to loop over. No begin Element … Read more

Categories JSP

JSTL c:forEach Core Tag

The JSTL <c:forEach> Core Tag is used when a block of statements is executed again and again. It works same as for loop in java. Syntax: <c:forEach var="counterVar" begin="startValue" end="endValue"> //Block of statements </c:forEach><c:forEach var="counterVar" begin="startValue" end="endValue"> //Block of statements </c:forEach> c:forEach tag attributes: Attribute Description Required items Information to loop over. No begin Element … Read more

Categories JSP

JSTL c:import Core Tag

The JSTL <c:import> Core Tag is used to include the content of other resource at a specific position in the current jsp. It works like include action but the difference is that it can work on relative as well as absolute url while include action can work only on relative url. Syntax: <c:import var=”varName” url=”relUrl/absUrl”/> … Read more

Categories JSP

JSTL c:choose , c:when and c:otherwise Core Tags

The JSTL <c:choose> Core Tag is used when a number of alternatives are available for a particular condition. It works same as of switch statement in java. The <c:choose> is like switch, <c:when> is like case and <c:otherwise> is like default statement. Syntax: <c:choose>   <c:when test="${testCondition1}"> //block of statements </c:when>   <c:when test="${testCondition2}"> //block … Read more

Categories JSP

JSTL c:if Core Tag

The JSTL <c:if> Core Tag is used in control flow. It evaluates an expression and execute a specific block of code is result returns true. Syntax: <c:if test ="testCondition"> //block of code </c:if><c:if test ="testCondition"> //block of code </c:if> c:if tag attributes: Attribute Description Required test It specify the condition to evaluate. Yes var It … Read more

Categories JSP