Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 64168 invoked from network); 1 Feb 2009 05:58:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Feb 2009 05:58:45 -0000 Received: (qmail 75772 invoked by uid 500); 1 Feb 2009 05:58:33 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 75748 invoked by uid 500); 1 Feb 2009 05:58:33 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 75737 invoked by uid 99); 1 Feb 2009 05:58:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 31 Jan 2009 21:58:33 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kprasad.tech@gmail.com designates 72.14.204.172 as permitted sender) Received: from [72.14.204.172] (HELO qb-out-1314.google.com) (72.14.204.172) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Feb 2009 05:58:26 +0000 Received: by qb-out-1314.google.com with SMTP id p4so403709qba.40 for ; Sat, 31 Jan 2009 21:58:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=8HeG5jVHr2RqC2zRWnly16xqq2xq1MGx2OvZFk6Sfo4=; b=OX+OjYFMvB4bo+yPkiYcp9b8FJUyWRzn6Qj+ES1rRB3/ejpcGvj3vYeiHT0VRvdRW0 TvNwL9oL+GivzMzXJ1oasrykx0P3wi6GHfMIoSEF2MQDsZyHWpinsTQhKyFNeps7NoW7 jV5KMFLs3XX1TAHITvZUSmuPj0IRx3yOdftC4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=vT/DFZMuaRxI9p1M8hF2FLE53zhI953XkGAqWx5pu4bcJ57aX4+5HaL0g6FSLmEm5e 0v6tdzwbMWAOQ0kEv+hboHDrPB2R6k7qjeI0lzemhim8w5UApd4yYstlpGJo7QdqVWDR ld4FwSuMLjI/7ngnbcomSvzYZG6hr4kHlHstw= MIME-Version: 1.0 Received: by 10.65.83.1 with SMTP id k1mr1820036qbl.128.1233467885600; Sat, 31 Jan 2009 21:58:05 -0800 (PST) In-Reply-To: <0AAE5AB84B013E45A7B61CB66943C17215B5E823A7@USEA-EXCH7.na.uis.unisys.com> References: <21767095.post@talk.nabble.com> <0AAE5AB84B013E45A7B61CB66943C17215B5E823A7@USEA-EXCH7.na.uis.unisys.com> Date: Sat, 31 Jan 2009 21:58:05 -0800 Message-ID: <92c18b730901312158xe54c011x30b78bdc813bd9fa@mail.gmail.com> Subject: Re: Location of properties file for web app in Tomcat From: Keshav Prasad To: Tomcat Users List Content-Type: multipart/alternative; boundary=00c09f90f98229c0cd0461d51fba X-Virus-Checked: Checked by ClamAV on apache.org --00c09f90f98229c0cd0461d51fba Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 < Chuck.Caldarale@unisys.com> wrote: > > From: Flavius [mailto:flavius@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. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > 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: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > --00c09f90f98229c0cd0461d51fba--