I want to load a few parameters from a xml
file on my Tomcat server. let´s say thats the folder structure:
Tomcat
|-webapps
|-MyWebApp.war
|-MyWebApp //(Source files)
|-META-INF
|-WEB-INF
|-configFile.xml
I tried several different methods like
File inputfile = new File("/MyWebApp/WEB-INF/configFile.xml");
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
Document doc = dBuilder.parse(inputfile);
which just delivered a filemissing exception
...
So the question is:
HOW do I have to set the path in my Java code to refer to files on my Tomcat ?