aspose file tools*
The moose likes JSP and the fly likes Problem with nested c:forEach Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Problem with nested c:forEach" Watch "Problem with nested c:forEach" New topic
Author

Problem with nested c:forEach

Aalok Mishra
Ranch Hand

Joined: Dec 23, 2008
Posts: 41
Hi All,

I ma trying to create a jsp page using c:forEach tag to control the display. I m having two list objects in my page and I want to have those objects in the nested loop so that I can display waht I want. Here is the code:



When I am using this code I am not getting images in any of the columns. Is there any mistake in comparing two different variables from two different lists?
Can anyone help me in it?

Thanks and Regards,
Aalok Mishra
InfoCepts, LLC
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

The test value should be escaped with the JSP EL escape, ${...}, so an expression would look like:
Aalok Mishra
Ranch Hand

Joined: Dec 23, 2008
Posts: 41


David Newton Today 4:58:32 PM Subject: Problem with nested c:forEach

--------------------------------------------------------------------------------

The test value should be escaped with the JSP EL escape, ${...}, so an expression would look like:




So you mean to say that i can not compare two different list objects using c:forEach even if I use nested c:forEach?
Is it the condition?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Aalok Mishra wrote:So you mean to say that i can not compare two different list objects using c:forEach even if I use nested c:forEach?

No, I mean to say that you have to use proper EL syntax in the c:if tag's test attribute.
Aalok Mishra
Ranch Hand

Joined: Dec 23, 2008
Posts: 41
Hi,

Thanks for your quick reply, but I solved the problem on my own.
I figured out the discontinuty in data which was causing no display on the age, once that was sorted out
it was all a piece of cake.
Thanks for your suggestions though, they will help in furture!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with nested c:forEach