title: ClassPathXmlApplicationContext cannot find the xml file
body: <p>I read several posts regarding this but still don't understand how to solve my issue. I am creating a <em>Spring Web Service</em> using this source as a starting point:
  <a href="http://eggsylife.co.uk/2010/01/03/spring-3-restful-web-services/" rel="nofollow">http://eggsylife.co.uk/2010/01/03/spring-3-restful-web-services/</a></p>
  
  <p>It has <code>src/main/java</code> folders and <code>src/main/webapp/</code>...</p>
  
  <p>I want to add a rest client in <code>com.spring.client/RestClient.java</code>:</p>
  
  <pre><code>public static void main(String[] args) {
          ApplicationContext ctx = new ClassPathXmlApplicationContext("/META-INF/client-context.xml");
          RestTemplate restTemplate = (RestTemplate)ctx.getBean("restTemplate");
  
          addStudent(restTemplate);
      }
  </code></pre>
  
  <p>But when I try to run it, it cannot find the <code>client-context.xml</code> file no matter where I put it. I'tried <code>"client-context.xml"</code>, <code>"META-INF/client-context.xml"</code>, etc...</p>
  
  <p>I've tried putting my <code>client-context.xml</code> in <code>src/main</code>, <code>src/main/webapp</code>, <code>src/main/webapp/META-INF</code>, <code>src/main/webapp/WEB-INF</code>, ...</p>
  
  <p>It seems weird. I looked around and found another <em>Spring REST</em> tutorial with a working client. In that project, the <code>src/main/webapp</code> folders have a blue "S" on top of it while my other project does it. It's just a regular looking folder.</p>
  
  <p>Does that make a difference? How do I fix this error? </p>
  
  <p>Thanks!</p>