天天看点

jstl <c:choose></c:choose>,<c:when></c:when>和<c:otherwise></c:otherwise>标签用法

<c:choose>、<c:when>和<c:otherwise>在一起连用,可以实现Java语言中的if-else语句的功能。

用法:

<c:choose>

       <c:when test="${detail[0].ordOutletsname != null && !empty detail[0].ordOutletsname}">  <!--判断指定的字段不为null  并且不为空 -->

      </c:when>

      <c:otherwise> <!-- 否则-->

     </c:otherwise>

</c:choose>