This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Struts and the fly likes how to display arraylist within arraylist in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to display arraylist within arraylist in jsp" Watch "how to display arraylist within arraylist in jsp" New topic
Author

how to display arraylist within arraylist in jsp

ah chong
Greenhorn

Joined: May 29, 2011
Posts: 1
Hi,

My question is on how to create an iteration within an iteration.

I have written the looping for following in Action class
...
for (int i=0;i<[first iteration size];i++){
request.setAttribute("sendToJsp"+i,arrayListObj);
}
...


In JSP page within an iteration, I wrote

...
<logic:iterate id="myIter" name="sendToJsp<%=index%>">
<bean:write name="myIter"/>
</logic:iterate>

which the index is belong to the first iteration.

It looks like can't find the bean name "sendToJsp<%=index%>" in any scope. By right my desired name is sendToJsp0,sendToJsp1,sendToJsp2 etc.. (which is the attribute from request)
 
Don't get me started about those stupid light bulbs.
 
subject: how to display arraylist within arraylist in jsp
 
It's not a secret anymore!