Hi all,

Caldarale, Charles R wrote:
From: Flavius [mailto:flav...@silverlion.com]
Subject: Location of properties file for web app in Tomcat

1. Where is the best place to put the properties file
if I want it located outside the war itself?

I don't think there's a "best place" that would be applicable to all 
environments.  One mechanism that is known to work is to have the admin specify a system 
property at Tomcat startup indicating where the property file is located; the webapp 
looks at the system property during initialization and reads its properties from the 
specified location.  The name of the system property can be whatever you choose, and 
could even include the context path of the webapp to allow multiple instances to be 
deployed in one container.



+1

I had the same issue as the OP and the best I could come up with was to change catalina.sh to include a system property that was then read by the web app. But we did fall into the same problem of multiple instances and we just made the system property that pointed to the file more qualified.

Kirk

Reply via email to