Ok, so are you saying that in using getRealPath(), I would always pass a string representing a single resource (e.g. "conf.xml instead of "config/conf.xml")? If that is the case, all of the resources would have to be stored in <<web-app>>/web, correct?
In the end, what I would like to acheive is a conf.xml file accessible only to the app and not the browser. I don't want clients hitting
http://blah/conf.xml and seeing all of the preferences. So I may be setting this up wrong to begin with since I am storing it in my application under <<web-app>>/web/config.xml. Maybe it should be moved to WEB-INF somewhere.
Also, I don't want to retrieve the resource by making an external http request to get it either. I just want to point the location locally via an application relative path or absolute if there is no alternative.
If I use the getResourceAsStream() and create a new File() from the result, and then use that file to create my XmlStore(), I should be golden, right? That method will give me access from a servlet to any file in the app or server file system (assuming proper rights).
Am I getting warmer?