This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes simple JSTL problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "simple JSTL problem" Watch "simple JSTL problem" New topic
Author

simple JSTL problem

Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 798
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>
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: simple JSTL problem
 
Similar Threads
JSTL List Help
value of boolean set in bean in jstl
jstl error
Tomcat 5.0.16 SQL JSLT not working
Debug JSTL