DIGIT-ARC read-only archive · snapshot: July 23, 2026

Hibernate and Tomcat

4 posts · originally from https://geek.digit.in/community/threads/hibernate-and-tomcat.10687/

Doddy
Doddy Original post #1
Jun 2, 2005 at 5:13 PM
Is it possible to make hibernate work with Tomcat without altering the server.xml?

I don't have easy access to server.xml and I'd like to control it from my application only.....
#/bin/sh
Jun 4, 2005 at 10:34 AM
If you are using Tomcat 5+ then you can define your context inside an xml inside your yourapp/META-INF directory:

*jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html
#/bin/sh
Jun 4, 2005 at 10:44 AM
ie: (from that link)

--------------------

Please note that for tomcat 5.x, unlike tomcat 4.x, it is NOT recommended to place <Context> elements directly in the server.xml file. Instead, put them in the META-INF/context.xml directory of your WAR file or the conf directory as described above.
#/bin/sh
Jun 4, 2005 at 10:47 AM
*www.hibernate.org/114.html

Should help too :)