wood burning stoves 2.0*
The moose likes Struts and the fly likes Need help in using tags for below code 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 "Need help in using tags for below code" Watch "Need help in using tags for below code" New topic
Author

Need help in using tags for below code

shah rah
Ranch Hand

Joined: Jan 04, 2007
Posts: 124
List personList = dao.findAll();

for (Iterator i = personList.iterator(); i.hasNext(); )
{
Person person = (Person) i.next() ;
Set ev = person.getEvents();
Event e = (Event)ev.iterator().next();
System.out.println(" name= "+ person.getFirstname() + " " +e.getTitle() );
}
I want to display the name and title on my JSP page but I want to know how to use struts tags for this?
abin awale
Greenhorn

Joined: Dec 23, 2008
Posts: 7
shah rah
Ranch Hand

Joined: Jan 04, 2007
Posts: 124
Thanks for the code. This is what I am getting when I run my jsp.

failed to lazily initialize a collection of role: com.hibernate.Personpersistence.Person.events, no session or session was closed
[1/7/09 8:46:27:859 EST] 00000039 LocalTranCoor E WLTC0017E: Resources rolled back due to setRollbackOnly() being called.

I have lazy="false" in my hibernate mapping and I still get the above error

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need help in using tags for below code
 
Similar Threads
Use of comparator and comparable interface
Regarding reading using XMLbeans
Selecting results from a search
XML
Object filtering in Hibernate from Database