I would like to use a properties file for JDBC properties cross web module (don't want to use web.xml per web module) that can be read from a standard JDBC library we wrote. It works fine on JRun when we put the properties file under .../server/default. But I couldn't figure out where I should put it on Tomcat or can it be done? If you had experience with this, please give me some feedback. Thanks a lot.
The most portable place to put properties and other resources that you want to be invisible from outside but used by servlets and JSP is under the WEB-INF directory. See the ServletContext getRealPath method. Bill
If you want to use it across web modules, I would think you'd want to keep it someplace on your server other than in a web module. You may even want to keep it out of Tomcat so it doesn't get overwritten or lost when you do upgrades.
Make the path configurable with either context-init-params or servlet-init-params.