This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Struts and the fly likes In Struts,<logic:iterate> to iterate over values of hashmap which are arraylist of arraylists Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "In Struts,<logic:iterate> to iterate over values of hashmap which are arraylist of arraylists" Watch "In Struts,<logic:iterate> to iterate over values of hashmap which are arraylist of arraylists" New topic
Author

In Struts,<logic:iterate> to iterate over values of hashmap which are arraylist of arraylists

pragya ranjan
Greenhorn

Joined: May 13, 2009
Posts: 1
How to iterate over values of hashmap which are arraylist of arraylists using <logic:iterate> ?
We are getting the error as "cannot create iterator for this collection"
Ankit Garg
Saloon Keeper

Joined: Aug 03, 2008
Posts: 9191
    
    2

Hi Pragya, welcome to javaranch!

Can you please post the source code which you are using. I think you should not face any problems. When you iterate over a HashMap, the Map.Entry is placed on the value stack. Then you can iterate over the values which will again be an ArrayList, so the array list will be placed on the value stack. Then again you can iterate over that array list using another iterator tag and so on...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: In Struts,<logic:iterate> to iterate over values of hashmap which are arraylist of arraylists
 
Similar Threads
using item in arraylist as order
iterating over a HashMap containing ArrayList as value
I need help, with logic:iterate in HashMap
Nested logic:iterate
how to use logic:iterate for ArrayLists withing Collection