tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keshav Prasad <>
Subject Re: Location of properties file for web app in Tomcat
Date Sun, 01 Feb 2009 05:58:05 GMT
I think what Chuck mentioned is a nice approach. You could set an env
variable and read it off when app server initializes something like this-

String path = System.getenv("PROP_FILE_PATH");

Use this file path to read the properties file.

On Sat, Jan 31, 2009 at 11:19 AM, Caldarale, Charles R <> wrote:

> > From: Flavius []
> > 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.
>  - Chuck
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message