I have different XML files in my src / main / recources folder and I would like to read them from my web application.
File f = new File("file1.xml");
f.getAbsolutePath();
This code is called inside the WebService, and it outputs "C: \ Users \ Administrator" when I look at the output of the Tomcat server. My real solution is to put the documents "file1.xml" outside of the WAR, in the folder "C: \", but in this way my WAR cannot be transferred.
I also tried
<bean name="webService">
<property name="document">
<value>classpath:file1.xml</value>
</property>
</bean>
But it just prints "classpath: file.xml" without parsing it.
Regards, Pete
source
share