KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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 the TOMCAT_HOME\conf but still I can't read it from my servlet. Tried using this (there is app.properties file in conf): this.getClass().getClassLoader().getResourceAsStream("/app.properties"); I don't have much properties maybe 10-15 I figured this won't be problem. I remember when I was using jboss this wasn't issue as this much. In my app I also specify DB connection spring in the context.xml can I specify my properties in there as well somehow? Or how this works with tomcat? I'd like to keep my properties seperate from my war/unpacked war. Update Reason for asking this is because I don't know where my app will be deployed (at what location)
Tags (comma-separated)
Save Edits
Cancel