aspose file tools*
The moose likes Struts and the fly likes problem with logic:iterate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "problem with logic:iterate" Watch "problem with logic:iterate" New topic
Author

problem with logic:iterate

Jim Colwood
Greenhorn

Joined: Jul 10, 2007
Posts: 10
hi,

i am trying to iterate list of lists using nested logic:iterate on my JSP. following is my code.



i am getting following error message.

Cannot create iterator for this collection

i am using Tomcat 5.5. any ideas friends?

thanks.


SCJP 6 |
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61434
    
  67

"apex coder",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jim Colwood
Greenhorn

Joined: Jul 10, 2007
Posts: 10
hope this works. sorry for that.
Rashmi Gopinath
Greenhorn

Joined: Jul 09, 2007
Posts: 4
You might want to try like this:

<logic:iterate id="dataset" name="datasets">
<member>
<bean:write name="dataset" property="title"/>
<logic:iterate id="item" name="dataset" property="items">
<member>
<bean:write name="item" property="title"/>
</member>
</logic:iterate>
</member>
</logic:iterate>


Thanks,
Rashmi
Narendra Kumar Pinnaka
Greenhorn

Joined: Jul 05, 2007
Posts: 9
Hi
i am using Struts 1.1.
i have list of dto. in jsp i have to display the dto based on the index

sample java code
int n = 3;

sampleDTO = (SampleDTO)mylist.get(n);

i need to display sample dto

can you please let me know apporiate tag i can use.

thanks in advance
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with logic:iterate