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

Problem with nested c:forEach

 
Aalok Mishra
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The test value should be escaped with the JSP EL escape, ${...}, so an expression would look like:
 
Aalok Mishra
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic