用jstl的if或when标签判断字符串是否为空
时间:2015-11-18 16:16:56
收藏:0
阅读:3691
在jsp页面用到jstl的if或when标签判断字符串不为空的时候,书写格式:
<c:when test="${not empty paramName}"> </c:when> <c:when test="${paramName != ‘‘}"> </c:when>
在jsp页面用到jstl的if或when标签判断字符串为空的时候,书写格式:
<c:when test="${empty paramName}"> </c:when> <c:when test="${paramName == null or paramName == ‘‘}"> </c:when>
原文:http://www.cnblogs.com/fengzhentian/p/4974574.html
评论(0)