[struts2]jstl标签用法技巧

1.<c:if test="${var} != null"></c:if>

2.

  <c:foreach var="singleVar" items="" varStatus="states"></c:foreach>

  <c:if test="${states.index%2=0}"></c:if>

  <c:if test="${states.index%2=1}"></c:if>

  <c:if test="${states.last}"></c:if>

3.

<c:choose>

<c:when test="${empty param.username}">

Nnknown user.

</c:when>

<c:when test="${param.username=='Tom'}">

${param.username} is manager.

</c:when>

<c:otherwise>

${param.username} is employee.

</c:otherwise>

</c:choose>

上一篇:【转】win7+ubuntu双系统安装方法--不错


下一篇:WPF Step By Step 系列 - 开篇 ·