title: Store xml files in resources folder (WAR), read from code
body: <p>I have different XML-files in my 'src/main/recources' folder, and I'd like to read them from my webapplication.</p>
  
  <pre><code>File f = new File("file1.xml");
  f.getAbsolutePath();
  </code></pre>
  
  <p>The code gets invoked inside a WebService, and this prints out 'C:\Users\Administrator' when I look inside the Tomcat-server-output. My current solution is to put the 'file1.xml'-documents outside of the WAR, in the 'C:\'-folder but this way my WAR is not transferable.</p>
  
  <p>I've also tried   </p>
  
  <pre><code>    &lt;bean name="webService"&gt;
          &lt;property name="document"&gt;
           &lt;value&gt;classpath:file1.xml&lt;/value&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>But that just prints out the "classpath:file.xml" without parsing it.</p>
  
  <p>Regards,
  Pete</p>