Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C6F57E482 for ; Fri, 25 Jan 2013 00:21:35 +0000 (UTC) Received: (qmail 82437 invoked by uid 500); 25 Jan 2013 00:21:32 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 82343 invoked by uid 500); 25 Jan 2013 00:21:32 -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 82334 invoked by uid 99); 25 Jan 2013 00:21:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jan 2013 00:21:32 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [198.245.42.130] (HELO mailsvr.crlcorp.com) (198.245.42.130) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jan 2013 00:21:25 +0000 X-ASG-Debug-ID: 1359073264-02224e088913fe0001-PXi1IZ Received: from exchanclust1.crlcorp.com (packetsure.crlcorp.com [172.18.18.235]) by mailsvr.crlcorp.com with ESMTP id 2S6wI6FwfgYzgB47 for ; Thu, 24 Jan 2013 18:21:04 -0600 (CST) X-Barracuda-Envelope-From: RosenbergJ@crlcorp.com X-Barracuda-RBL-Trusted-Forwarder: 172.18.18.235 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01CDFA91.DC824662" Subject: Load properties file from Tomcat directory Date: Thu, 24 Jan 2013 18:21:02 -0600 X-ASG-Orig-Subj: Load properties file from Tomcat directory Message-ID: <588894648FDF4F48AF665FFF397DC978424118@EXCHANCLUST1.crlcorp.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Load properties file from Tomcat directory Thread-Index: Ac36keC26vEZA895QeaNvsZQT8xWdg== From: "Justin Rosenberg" To: "Tomcat Users List" X-Barracuda-Connect: packetsure.crlcorp.com[172.18.18.235] X-Barracuda-Start-Time: 1359073264 X-Barracuda-URL: http://192.168.150.24:8000/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at crlcorp.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: -1002.00 X-Barracuda-Spam-Status: No, SCORE=-1002.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=1000.0 X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01CDFA91.DC824662 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Is there a to load a properties file that is dropped in the ${catalina.base}/lib directory? =20 When I try the following it returns null: MyClass.class.getResourceAsStream(PROPERTY_FILE_NAME)=20 =20 I realize I can do the following, but I don't want the code to be server specific: props.load(new File(System.getProperty("catalina.base") + "/lib/" + PROPERTY_FILE_NAME).toURL().openStream()); =20 Thanks for the help, Justin=20 =20 CONFIDENTIALITY NOTICE: The information in this message, and any attachment, is intended for the=20 sole use of the individual and entity to whom it is addressed. This=20 information may be privileged, confidential, and protected from=20 disclosure. If you are not the intended recipient you are hereby notified= =20 that you have received this communication in error and that any review,=20 disclosure, dissemination, distribution or copying of it, or its contents,= =20 is strictly prohibited. If you think that you have received this message=20 in error please notify the sender and destroy all copies of this=20 communication and any attachments. Thank you. ------_=_NextPart_001_01CDFA91.DC824662--