On 17.05.2010 18:05, Rainer Jung wrote:
On 17.05.2010 17:14, Juergen Weber wrote:
Hi, this seems to be a FAQ, but I could not find a solution for Tomcat 6:
We want to keep property files out of war files. Where should we put the
property files to access them from the web app via
Class.getResourceAsStream() ?
For JBoss one would simply drop them into the server conf folder, for
Geronimo one would use the SharedLib gbean.
But for Tomcat? Add a server.loader path to catalina.properties ?
If you want to keep them webapp-private, you might be interested in
http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/loader/VirtualWebappLoader.html
Although the page states "This is not meant to be used for production.
Its meant to ease development with IDE's without the need for fully
republishing jars in WEB-INF/lib" it seems to work very well.
The documentation page for Tomcat 7 will contain examples. At the moment
they are only in subversion in xml format:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/loader.xml?view=markup
but the API doc also contains an example.
The documentation addition and the new flag "searchVirtualFirst" might
eventually be backported to Tomcat 6 (I already proposed that). We
discuss about merging the feature into the Tomcat 7 standard webapp
loader. For TC 6 it will remain separate.
Regards,
Rainer
I should also mention commons-configuration, which is a very powerful
framework for configuration files. It supports many things
out-of-the-box, like interpolation of system poperties, reloading
changed files, including config files in other config files etc.
Regards,
Rainer
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org