I am using
tomcat 5.5 and jstl 1.1 (2.0). I am having a problem with the following code
<
jsp:useBean id="values" type="java.util.List" scope="request"/>
<html>
<head>
<title> title goes here</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<table width="100%" border="0" class="fieldlabel">
<tr> Cruise lines </tr>
<c:forEach items="${values}" var="value" varStatus="status">
<c:if test="${status.first}"> first </c:if>
<c:if test="${status.last}"> last </c:if>
<tr><td>zz<c:out value="${value}" default="no value available"/></tr></td>
</c:forEach>
<c:forTokens items="a;b;c;d" delims=";" var="current">
<tr><td><c:out value="${current}"/></td></tr>
</c:forEach>
</body>
</html>
Nothing prints for c:forEach of c:forTokens
when I do a view source when the jsp is rendered in the browser I see the following:
<table width="100%" border="0" class="fieldlabel">
<tr> Cruise lines </tr>
<c:forEach items="[one, two, three]" var="value" varStatus="status">
<c:if test=""> first </c:if>
<c:if test=""> last </c:if>
<tr><td>zz<c:out value="" default="no value available"/></tr></td>
</c:forEach>
<c:forTokens items="a;b;c;d" delims=";" var="current">
<tr><td><c:out value=""/></td></tr>
</c:forEach>
</body>
</html>
I see the values in the items but they do not print. What stupid thing am i doing wrong?
Thanks