Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to display arraylist within arraylist in jsp

 
ah chong
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic