aspose file tools*
The moose likes JSP and the fly likes Iterating <c:foreach> to get values from sublist Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Iterating <c:foreach> to get values from sublist" Watch "Iterating <c:foreach> to get values from sublist" New topic
Author

Iterating <c:foreach> to get values from sublist

Amit Vakodkar
Greenhorn

Joined: May 28, 2007
Posts: 10
Hi,

I have issues in retrieving code while using <c:foreach> tag, the scenario is like this

Code is just for Understanding, nt real code, assume productList & imageList are both having values:

--------------This is my JAVA CODE------------------------------
List containedList = new Arraylist();
List productList = <getDetails>
List imageList = <getDetails>

containedList.add(productList);
containedList.add(imageList);
--------------This is my JAVA CODE------------------------------

I am passing this containedList obj to the JSP page, now here is the Issue, i am not aware how to retrieve the data from both "productList " & "imageList ", using c:foreach, if possible thru any other tag please suggest. Need is ASAP.

Thanks.



Amit Vakodkar
Greenhorn

Joined: May 28, 2007
Posts: 10
Basic thing is that i am not an expert in c:foreach tag, the prob is how to get the values using c:foreach
Anuj Rathi
Greenhorn

Joined: Sep 23, 2009
Posts: 4
Try iterating in this way.

Amit Vakodkar
Greenhorn

Joined: May 28, 2007
Posts: 10
Thanks Anuj, this was the code i was looking out for, but wasnt able to test it as the requirement was changed & thus wasnt able to implement it, but got the whole thing from it. Thanks for the Code Mate. Obliged!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Iterating <c:foreach> to get values from sublist
 
Similar Threads
Error in Struts
bean and for each
EL tag for setting textfield values using Javascript
Iterating over Map using JSTL
EL with List of Objects