Which development tool are you using?
Just put it in the root folder of your Java source code. Actually, at runtime it needs to go in the WEB-INF\classes folder, so make sure everything that is the source folder gets moved to the WEB-INF\classes folder at runtime.
As just a
test, try copying the file into WEB-INF\classes and see what happens when you re-run it.
I'm assuming that this is a bit of learning and proof of concept, so your POJO classes are right there in your web module, right? We like to put POJO classes in a separate project or JAR when we're building a sophisticated project, but it tends to complicate things a little too much when you're just learning.
Here's a little tidbit on where to put the hibernate.cfg.xml file from my book
Hibernate Made Easy.
Where do you put the hibernate.cfg.xml file???
Of course, if you're customizing the sample hibernate.cfg.xml file that comes with the Hibernate Core download, you'll have to save the edited file to a more conspicuous place on your workstation. The only rule about the hibernate.cfg.xml file is that it must be on your classpath. I typically place it in the src directory where I write my Java code, and make sure it gets copied into the build folder where my compiled byte-code gets placed. In this instance, I'm just going to save the hibernate.cfg.xml file in the C:\_hiblib folder, and make sure this folder is on the classpath whenever I compile or run my Java code.
Getting Started with Hibernate Tutorial
And post back. Don't leave us hanging on for an answer!
-Cameron McKenzie