wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets 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)
 
Consider Paul's rocket mass heater.
 
subject: how to display arraylist within arraylist in jsp
 
Similar Threads
Dynamic Form Elements - Exception
How to display ArrayList in JSP
Basic Bean Doubt
logic:iterate usage improvement needed
Don't understand C++ Iterators and Vectors