A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Spring in Action
this week in the
Display java.util.List returned by Hibernate in JSP
Joined: Aug 01, 2007
Aug 01, 2007 14:50:00
I have a java.util.List of simple objects (3
properties only) returned by hibernate:
Query query = session.getNamedQuery("MyQuery");
What is the best way of displaying the results in a
I am struggling to find how to get the list to a <c:forEach loop.
Many thanks if anyone can help.
Joined: Feb 05, 2001
Aug 01, 2007 18:29:00
I am going to move this to the JSP forum, since it is a JSP question and not a Hibernate or ORM specific question.
Perfect World Programming, LLC
Two Laptop Bag
How to Ask Questions the Smart Way FAQ
Joined: Dec 11, 2004
Aug 01, 2007 19:20:00
If you bind your list to a scope object (request, session, etc..), your JSTL forEach loop will be able to find it using an EL expression in the "items" attribute.
How to ask a question...
Simple Servlet Examples
I agree. Here's the link:
subject: Display java.util.List returned by Hibernate in JSP
Iterating a List Using JSTL
Making Hibernate 5.0 Compliant
Convert Set to List
Hibernate - How to retrieve data from the database
Problem with Count query having IN clause in Hibernate
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014