jstl c 标签实现判断功能

来源:互联网 发布:批发部出货软件 编辑:程序博客网 时间:2024/06/05 10:30

taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"

 

单个判断:

 

<c:if test="${resource.value=='GALL' && resource.checked == true}">
   context here!

</c:if>

 

多重判断:

 

<c:choose>
      <c:when test="${resource.value=='GALL' && resource.checked == true}">
         Your context here!

      </c:when>
     
      <c:otherwise>Your context here!</c:otherwise>
     
</c:choose>

 

原创粉丝点击