hibernate.cfg.xml not found
hibernate.cfg.xml not found - WebSphere PortalServer
Posted by:
Bernd
Zimmermann
on
November 23, 2004 in response to
Message #92850 0 replies in this thread
We had the 'hibernate.cfg.xml not found' problem when developingIBM WebSphere Portalserver portlets with struts and hibernate.
The solution was to have the hibernate.cfg.xml in WebSphere
Application Developer in ./JavaSources and get the hibernate
configuration at runtime this way:
File f=new File(servlet.getServletContext()
.getRealPath("/WEB-INF/classes/hibernate.cfg.xml"));
Configuration c = new Configuration().configure(f);
This is portable from WSAD to WPS