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

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

 
Jaskiran Kaur
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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:
 
Stefan Evans
Bartender
Posts: 1717
10
  • Mark post as helpful
  • send pies
  • 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?

 
Ram Narayan.M
Ranch Hand
Posts: 247
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • 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
  • 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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic