Win a copy of Terraform in Action this week in the Cloud forum!
  • 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 Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

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!
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic