• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Displaying an object's properties/fields on JSP using c:foreach

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

"callFlowDetails.callFlowMasterDataList" is a list of objects which I am returning from my controller. List is populated correctly in controller and set back in model attribute used in jsp form, but I am not able to view the list data on jsp.
I am using following code in jsp, Please advise what I might be doing wrong below:
 
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So what happens when you run this page?
Error message? Any messages in the log? Stack traces?
Blank page?
Page runs but doesn't display what you want? What does it display, and what is it doing wrong?

What do you see when you view source on the page?
If you do a ${callFlowDetails.callFlowMasterDataList} to print out the list?
Have you declared the core tag library on your page?

 
Ranch Hand
Posts: 247
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please make sure if "model" has been mapped to "callFlowDetails" in request, session (or) application scope attributes...

If its set in request scope, you have to do "request forwarding" to the JSP page where you use this iteration logic of list in model instance.
 
Jaskiran Kaur
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Everything was and is working right :). Just the silliest mistake in JSP, I had commented something before the row displaying data using<!-- -->. Once I removed the commented part, it started working. Weird JSP!

Thanks guys!
 
reply
    Bookmark Topic Watch Topic
  • New Topic