This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
How does a web container (like tomcat) handle .properties files for access by servlets?
For example, if a servlet needs to access some stored key-value pairs from a .properties file, where should this file be placed?
FileInputStream myPropertiesFile = new FileInputStream("myconfig"); Properties myProperties = new Properties(); myProperties.load(myPropertiesFile); // access properties from the object here... myPropertiesFile.close();
Where should this file be placed (for example, in case of tomcat) for the servlet to be able to read it?
Does the location change, if the class that needs to access the properties file is a web service? (Axis under tomcat)