File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes why JSTL loop only display the first object? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "why JSTL loop only display the first object?" Watch "why JSTL loop only display the first object?" New topic
Author

why JSTL loop only display the first object?

cool water
Greenhorn

Joined: Jun 27, 2003
Posts: 1
I am trying to test some JSTL tag.
Here is my code:
<c:forEach var="item" items="${sessionObject.rows}">
<fmt:formatNumber value="${item.value}" type="currency" />
</c:forEach>
"rows" is the ArrayList of object inside my "sessionObject". and in this arrayList, I have 3 beans(bean1, bean2, bean3).
But the problem is I only got bean1 info showing up. I tried to debug this code in my servlet, it shows that I did pass 3 beans into this list. Then I use
<c ut value=="${sessionObject.rows}" />
and I did see I have 3 beans.
But inside this <c:forEach> loop, the rest of 2 beans just don't want to show up.
does anybody have this experience before?
I am pretty new for JSTL tags.
Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: why JSTL loop only display the first object?
 
Similar Threads
Output the text field
JSTL forEach tag taking longer time than scriplets ???
problem incrementing loop in jstl
Recursion & JSTL?
Jstl foreach iterate over arraylist containing map object using paramvalues