Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with logic:iterate

 
Jim Colwood
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64843
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
 
Jim Colwood
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hope this works. sorry for that.
 
Rashmi Gopinath
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic