• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Problem with nested c:forEach

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic