What is the best practice for reading config file(s) for your application. Which folders in tomcat server are \"on the classpath\".
I tried placing my config file in
Though it might be a PITA, it is probably also a feature that you don't know where it will be deployed. You can't "couple" yourself to that fact then!
Depending upon the rest of your Java stack, the best way is usually independent of Tomcat. If you are using Spring, you can say for example:
new ClassPathResource("**/myFile.properties")
or if using Java Config, another example:
@PropertySource("classpath:META-INF/MyWeb.properties")
In plain Java you can say:
InputStream stream = loader.getResourceAsStream(resourceName);
where loader is an instance of ClassLoader