wood burning stoves 2.0*
The moose likes Struts and the fly likes iterate 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 "iterate" Watch "iterate" New topic
Author

iterate

Kaiser Lautern
Greenhorn

Joined: May 11, 2005
Posts: 18
Hi, folks,

Can anybody explain why this iterate tag is not iterating?
It is showing only the first string of the array.

This is the action code:


and this is the JSP:



Thank you.

Kaiser
michelle Wang
Ranch Hand

Joined: Jan 12, 2004
Posts: 65
Hi,bcs you use this:
request.setAttribute("dao",myDAO);

So you passing the list to JSP using request, maybe you can try this:
addin scope="request" to your logic:iterate tag, and change property to type, like this:

<logic:iterate id="mydao" name="dao" scope="request" type="data"/>

same if your use session to pass the list, then set scope="session"

Hope this helps.


michelle Wang <br />SCJP 1.4
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: iterate
 
Similar Threads
html:checkbox element with POJO-based array not updated
how to use logic:iterate for ArrayLists withing Collection
Iterate Hashmap through struts
Data display in table usinf logic:iterate tag
how to handle multiple iterates for the code