You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Francis <ff...@met.wallonie.be> on 2006/06/22 15:29:46 UTC
Array with jstl
I'm trying to use array with jstl
Sample of code
........
<c:set value="0" var="i"/>
<c:forEach items="${ stmt.rows }" var="row">
<c:set value="${i+1}" var="i"/>
<c:out value="${ row.l_element }"/> <br>
<c:set scope="page" value="${ row.l_element }" var="titre[i]"/>
</c:forEach>
<c:set value="${i}" var="nbrTitre"/>
<c:out value="${ nbrTitre }"/> <br>
<c:forEach begin="0" end="${nbrTitre}" var="j" varStatus="t" >
array : <c:out value="${ titre[j] }"/> <br>
var : <c:out value="${ t.index }"/> <br>
</c:forEach>
.......
The page works fine but there is nothing in the array.
row.l_element is a string.
What's wrong?
Francis
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org