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)