wood burning stoves 2.0*
The moose likes Struts and the fly likes getting hibernate session in Struts2 (Urgent) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "getting hibernate session in Struts2 (Urgent)" Watch "getting hibernate session in Struts2 (Urgent)" New topic

getting hibernate session in Struts2 (Urgent)

sam raghav

Joined: Jul 10, 2009
Posts: 10
Dear All,

I am new to Struts2, I am generating hibernate sessionFactory and hibernate Session implementing Filter.

Now DAO needs hibernate session object to access database. But I don't know how to get it?

Please help.

Thanks and regards.
David Newton

Joined: Sep 29, 2008
Posts: 12617

See EaseUp.

This isn't really a Struts-related question if you're just asking how to get Hibernate sessions/session factories. There are several ways to go about it; the ORM forum might be a more appropriate place to ask.

If you're using Spring then the DAOs can be injected with session factories essentially automatically.
I agree. Here's the link: http://aspose.com/file-tools
subject: getting hibernate session in Struts2 (Urgent)
Similar Threads
Struts2 hibernate one-to-one Mapping
Struts2 + Hibernate
downloading a file struts2