EL表达式

来源:互联网 发布:ubuntu server安装 编辑:程序博客网 时间:2024/06/11 16:47

计算 序号

<c:forEach var="auser" varStatus="p"  items="${userlist}" >

 <td>${(u_indexpage-1)*u_everypage+p.index}</td>

</c:forEach> 

判断分支

<c:choose><c:when test="${auser.userStatus eq '1'}"><c:out value="启用"></c:out></c:when><c:otherwise><c:out value="未启用"></c:out></c:otherwise></c:choose>
也可以用
 <c:if test="${auser.userStatus eq '1'}"><c:out value="启用"></c:out></c:if><c:if test="${auser.userStatus eq '0'}"><c:out value="未启用"></c:out></c:if>




原创粉丝点击