I have some problems with creating a jsp file. I would like to use JSTL in order to display a collection somehow. First, I have created a java code inside my jsp:
<% for(int i = 0; i < ((List<BookPosition>)request.getAttribute("books")).size(); i+=1) { %>
<label>Test</label>
<% } %>
Then, I've create a JSTL snippet.
<c:forEach var="book" items="$(books)">
<label>Test</label>
</c:forEach>
Unfortunately, the first one outputs correct number of labels (24) and the JSTL version only one label (despite the collection contains exaclty 24 items).
Why?