File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "iterate" Watch "iterate" New topic


Kaiser Lautern

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.

michelle Wang
Ranch Hand

Joined: Jan 12, 2004
Posts: 65
Hi,bcs you use this:

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:
subject: iterate
It's not a secret anymore!