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>

 

Leave a Reply

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