Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 97665 invoked from network); 21 Nov 2001 15:12:58 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 21 Nov 2001 15:12:58 -0000 Received: (qmail 25541 invoked by uid 97); 21 Nov 2001 15:12:23 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 25525 invoked by uid 97); 21 Nov 2001 15:12:22 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 25496 invoked from network); 21 Nov 2001 15:12:22 -0000 Message-ID: <764CA2FF49EC054BA086FC8253A52DD7432D4B@merc09.na.sas.com> From: Larry Isaacs To: 'Tomcat Users List' Subject: RE: Default file locations for .properties file Date: Wed, 21 Nov 2001 10:12:16 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I would guess it is writting to the default directory of JVM, which is typically TOMCAT_HOME. I'm not sure the Properties class would be aware of Tomcat's "home" directory. You could try ServletContext.getRealPath() to get the file path, i.e. getRealPath("/WEB-INF/myprops.properties"). Hope this helps. Cheers, Larry > -----Original Message----- > From: Roger Varley [mailto:roger_varley@yahoo.com] > Sent: Wednesday, November 21, 2001 9:53 AM > To: tomcat-user@jakarta.apache.org > Subject: Default file locations for .properties file > > > Hi > > I have a servlet running under Tomcat 3.2 that reads and writes to a > properties file created by the Properties class. If I only provide the > unqualified name of the properties file in my servlet, Tomcat > reads and > writes the file to the %TOMCAT_HOME% directory. This is > consistant with the > documentation in the server.xml file. The comments go onto > say that I can > specify a "home" parameter that will be used to represent the > base directory > for all relative paths, but these comments appear in a > section of server.xml > that appears to be concerned with global configuration. So > I'm concerned > that because the "all" is unqualified that by setting this > "home" parameter > I will disrupt the "webapps//web-inf behaviour > and that all my > properties files will appear in the same directory > > I am running a number of different contexts and I would like > each properties > file to appear somewhere within the directory structure for > each context > without having to specify the absolute path in each servlet. > > I hope that this makes sense. > > Regards > Roger > -- > "You can lead a horse to water but you can't make him drink, > and shooting the rider because his horse allowed itself to > get dehydrated is not the proper response," Lane Thomas > > > > > _________________________________________________________ > > Do You Yahoo!? > > Get your free @yahoo.com address at http://mail.yahoo.com > > > > > -- > To unsubscribe: > For additional commands: > Troubles with the list: > -- To unsubscribe: For additional commands: Troubles with the list: