Two Laptop Bag*
The moose likes Struts and the fly likes Iteration of List in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Iteration of List in JSP" Watch "Iteration of List in JSP" New topic
Author

Iteration of List in JSP

M Zahid
Greenhorn

Joined: Feb 05, 2011
Posts: 3
I got a List through criteria with following code. I am using struts and hibernate technologies in netBean6.8. The following method has been coded in a helper class.



============================================
Now I want to iterate the above list in jsp. Kindly guide for this or any other possible method to iterate this list in JSP.

Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3064
    
  33

For iterating in JSP you can have a look at the EL syntax or the Tag library should have support for this. Am not able to recall the exact syntax.


Mohamed Sanaulla | My Blog
M Zahid
Greenhorn

Joined: Feb 05, 2011
Posts: 3
coding in the action class is appended below



Libraries and coding in the jsp is appended below



The exception occurs that no collection found
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3018
    
  35

Zahid, I added code tags for your posts. Please don't forget to UseCodeTags in future.
I'm moving to Struts forum...


Founder of ExamLab and Systemup
See how I can help you to become an awesome programmer
Shankar Tanikella
Ranch Hand

Joined: Jan 30, 2011
Posts: 329

Not sure, but try arrayList once instead of List and see if it is working. If it doesnt work just post the form bean content for this list, bean definition in struts config and exception stacktrace (few lines more)


Have Fun with Java
little,little.. little by little makes a lot..
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1016
Rather than logic:iterate I would prefer the JSTL forEach tag over the list attribute.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Iteration of List in JSP
 
Similar Threads
Iteration of List in JSP
SQL to HSQL - DetachedCriteria
AND/OR in Hibernate - Criteria object
Querying on Child Objects
Caseinsensitive Search Hibernate API