title: web application - where to place hibernate.cfg.xml file?
body: <p>I am writing a web application and I have to add hibernate. I configured maven (pom.xml) etc. but now I am getting the following error:</p>
  
  <pre><code>exception
  javax.servlet.ServletException: org.hibernate.HibernateException: /hibernate.cfg.xml not found
  </code></pre>
  
  <p>I am using NetBeans. I tried moving this file to WEB-INF, root project folder, src directory (default package) but it's still not working. How can I do? I don't want to set path to this file programmatically like this:</p>
  
  <pre><code>Configuration cfg = new Configuration();
  cfg.addResource("/some/path/to/this/file/Hibernate.cfg.xml");
  </code></pre>