JSTL If Condition

<c:set var="language" value="java"/>
    <c:if test="${language == 'java'}" >
        you are using java language
    </c:if>

    <c:if test="${language != 'java'}" >
        you are using not java language
    </c:if>

 JSTL if Condition Store Result

<c:if test="${language == 'java'}" var="result" scope="request" >
       you are using java language
   </c:if>
   <c:if test="${result}">
       you are using java language
   </c:if>

 

Was this post helpful?
Let us know, if you liked the post. Only in this way, we can improve us.
Yes
No

Leave a Reply

Your email address will not be published. Required fields are marked *