I have a web application which I deploy on Tomcat Server manually.
My property file with database credentials is not located in classpath. On startup I load it like this:
prop.load(new FileInputStream("C:\\application.property"));
Downback of this is that now I can move my code to linux based platform without changing the source.
If I put this file to classpath it will be packed inside war (with all credentials) and replaced every time I redeploy my application. Tomcat is deleting application dir and replace it with war content on redeploy.
The question is: How and where to put property file in classpath and ensure that this file will not be replaces/deleted by application server on application redeployment. And the file must not be inside war.