Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 38325 invoked from network); 1 May 2007 19:53:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 May 2007 19:53:57 -0000 Received: (qmail 30369 invoked by uid 500); 1 May 2007 19:53:51 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 30344 invoked by uid 500); 1 May 2007 19:53:51 -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 30330 invoked by uid 99); 1 May 2007 19:53:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 May 2007 12:53:51 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: 128.253.83.142 is neither permitted nor denied by domain of dns4@cornell.edu) Received: from [128.253.83.142] (HELO authusersmtp.mail.cornell.edu) (128.253.83.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 May 2007 12:53:44 -0700 Received: from [128.253.38.45] (dns4-laptop-1.ento.cornell.edu [128.253.38.45]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.13.1/8.12.10) with ESMTP id l41JrNVP000513 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 1 May 2007 15:53:23 -0400 (EDT) Message-ID: <46379AB4.3020305@cornell.edu> Date: Tue, 01 May 2007 15:53:24 -0400 From: David Smith User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: JAR file not finding external properties files References: <763850.90143.qm@web60015.mail.yahoo.com> <46379982.9000300@cornell.edu> In-Reply-To: <46379982.9000300@cornell.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Oh.... helps to read all the message:) jars in common/lib can't read files in your webapp. You could use common/classes --David David Smith wrote: > Your could put the properties file in WEB-INF/classes which is > equivalent to storing it in the jar file. Otherwise we'll need to > know more about where you are storing your properties file to help. > > -- David > > > > Mike Peremsky wrote: >> I created some utility classes that read proeprties files (e.g. >> com.mvp.utils.ExtProperties). In the method where I try to load the >> properties file I have >> package com.mvp.utils; >> class ExtProperties { >> private static PropertyResourceBundle loadProperties(String >> propsFile) { >> PropertyResourceBundle prb = >> (PropertyResourceBundle) ResourceBundle.getBundle(propsFile); >> return prb; >> } >> } >> This file is then compiled and placed in a jar file, which is >> copied to my Tomcat\common\lib directory. Whenver I try to call the >> ExtProperties class it fails to find the properties file. If I >> include the properties file in the jar file it finds it with no >> problem. I assume that this is a class loader problem (which which I >> am not very familiar). >> What do I need to do to get the class in the jar file to find >> the properties files external to it? Do I need to specify the full >> path to the file? >> TIA >> - Mike >> >> >> >> --------------------------------- >> Ahhh...imagining that irresistible "new car" smell? >> Check outnew cars at Yahoo! Autos. >> > > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org