title: Cannot load /WEB-INF/applicationContext.xml
body: <p>Saw same issues in others queries, but did not find the answer, hence posting it afresh.</p>
  
  <p>Created a sample Helloworld service in Rest and deployed it in Tomcat-Jersey. Not using Maven.
  Injecting a spring bean define in applicationContext.xml which is present in WEB-INF directory.</p>
  
  <p>Deployed the service in Tomcat within Eclipse.
  But when I execute the rest service, cannot find file applicationContext.xml.
  Once I copy the file to <strong>WEB-INF/classes</strong> only, it works.</p>
  
  <p>What is the way to make it work by keeping it only in <strong>WEB-INF</strong>?</p>
  
  <p>web.xml :</p>
  
  <pre><code>    &lt;listener&gt;
      &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
  &lt;/listener&gt;
  &lt;context-param&gt;
      &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
      &lt;param-value&gt;/WEB-INF/applicationContext.xml&lt;/param-value&gt;
  &lt;/context-param&gt;
  </code></pre>
  
  <p>Rest service code snippet :</p>
  
  <pre><code>    ctx = new ClassPathXmlApplicationContext("classpath:applicationContext.xml");
  </code></pre>