I am building a web app that uses hibernate.
I would like to place my hibernate.cfg.xml file in the WEB-INF/ directory, and all of my mapping files in a subdirectory, namely WEB-INF/hibernate/.
I have tried many things to achieve this and grep'ed the forums, googled it, and can not find an answer.
I want to do something like the following:
configuration.configure("WEB-INF/hibernate.cfg.xml");
then, in my hibernate.cfg.xml file,
<mapping resource="WEB-INF/hibernate/user.hbm.xml"/>
<mapping resource="WEB-INF/hibernate/settings.hbm.xml"/>
Has anyone done this, or am I forced to put the mapping files in WEB-INF/classes and use the class mapping:
<mapping class="com.beaglebuddy.Settings"/>
Thanks for any help
|