c if else

类似 if

<c:if test="${condition1}"> 
  condition1为true 
</c:if>

类似 if else

<c:choose> 
 
  <c:when test="${condition1}"> 
 
  condition1为true 
 
  </c:when> 
 
  <c:when test="${ condition2}"> 
 
  condition2为true 
 
  </c:when> 
 
  <c:otherwise> 
 
  condition1和condition2都为false 
 
  </c:otherwise> 
</c:choose> 


<c:forEach var="x" begin="1" end="9" step="1">

         ${x*x}

</c:forEach>

猜你喜欢

转载自ofamber.iteye.com/blog/2119255