File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Displaying an object's properties/fields on JSP using c:foreach Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Displaying an object Watch "Displaying an object New topic
Author

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

Jaskiran Kaur
Greenhorn

Joined: Dec 01, 2011
Posts: 3
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

Joined: Jul 06, 2005
Posts: 1018
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

Joined: Jul 11, 2010
Posts: 247

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.


SCJP 6 [SCJP - Old is Gold]
Jaskiran Kaur
Greenhorn

Joined: Dec 01, 2011
Posts: 3
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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Displaying an object's properties/fields on JSP using c:foreach