File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Iterating <c:foreach> to get values from sublist

 
Amit Vakodkar
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try iterating in this way.

 
Amit Vakodkar
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic