Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

simple JSTL problem

 
Edward Chen
Ranch Hand
Posts: 798
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the below simple JSTL, I do not know why "this is true " and "this is false " can NOT be output ?
Thanks
//-------------------------------
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<html>
<body>
<c:forEach var="i" begin="1" end = "10">
<c ut value="${i}"/>
<c:choose>
<c:when test=" ${i%2 == 0}">
<c ut value=" this is true"/><br>
</c:when>
<c:when test=" ${i%2 != 0} ">
<c ut value="this is false"/><br>
</c:when>
<c therwise>
this is otherwise <br>
</c therwise>
</c:choose>
</c:forEach>
</body>
</html>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic