We have been using System.getProperties("user.dir") to get the location of a properties file. Now that it has been deployed on Tomcat(via servlet), the System call is giving the location as tomcat and not at the location at where the properties file exist.
How can we call the the properties file dynamically?
Given:
- Tomcat is not the only way the app will be deployed
- We have no control on where the app may be placed.
- Relative paths will not work as that Vista is being used and Vista breaks relative paths.
- This must work on all OS, including(but not limited to) Linux, XP and Vista.
- EDIT I implied this, but in case I was not clear enough, I have no way of knowing the path String.