From tomcat-user-return-31108-qmlist-jakarta-archive-tomcat-user=jakarta.apache.org@jakarta.apache.org Tue Aug 27 14:15:27 2002 Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 64317 invoked from network); 27 Aug 2002 14:15:26 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 27 Aug 2002 14:15:26 -0000 Received: (qmail 25474 invoked by uid 97); 27 Aug 2002 14:15:38 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 25458 invoked by uid 97); 27 Aug 2002 14:15:38 -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 25444 invoked by uid 98); 27 Aug 2002 14:15:37 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: <00e101c24dc5$4f08ad60$ac8a06d1@Sirius> From: "Alan Tingley - Iperia" To: "Tomcat Users List" References: <3D6B5D14.5090806@ntsp.nec.co.jp> Subject: Re: Loading properties files Date: Tue, 27 Aug 2002 08:28:43 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N we're using something like (off the top of my head): System.getResourceAsStream("com/domain/package/file.properties") and that works; until we fixed our app deployment structure, we had to use getSystemResourceAsStream (we were putting things in common/lib when we shouldn't have). Al ----- Original Message ----- From: "randie ursal" To: "Tomcat Users List" Sent: Tuesday, August 27, 2002 7:05 AM Subject: Re: Loading properties files why is it tomcat could not locate the property file if i place it on the package directory structure of my servlets?...it is still on the WEB-INF/classes directory isnt it? just need some more clarifications. e.g WEB-INF/classess/com/test/MyProperty.properties thanks Alan Tingley - Iperia wrote: >Your properties file must be in a location that Tomcat knows about via its >classpath (WEB-INF/classes is on Tomcat's classpath, that's why it worked >when your file was there). See the Tomcat docs under "Classpath How-to", >which describes the class loaders in Tomcat. >Alan Tingley > >----- Original Message ----- >From: "Laurent Michenaud" >To: >Sent: Tuesday, August 27, 2002 4:40 AM >Subject: Loading properties files > > >Hi, > >Could u tell me what is not correct with that : > >Before we had that ( the properties files were in WEB-INF/classes ) and >that works : > >package com.a2a.util ; >public interface A2aConstantes >{ > public static final String SCHEMA = >java.util.ResourceBundle.getBundle("db").getString("schema"); >} > > >Now we want to have properties files in WEB-INF/config so we change >the file like this : > >package com.a2a.util ; >public interface A2aConstantes >{ > public static final String SCHEMA = >java.util.ResourceBundle.getBundle("/WEB-INF/config/db").getString("sch e >ma"); >} > >But it doesnot work, it can't find the db.properties. I have tried with >"WEB-INF/config/db" and "/WEB-INF/config/db.properties" but >it doesnot work too. > >Can u tell me what's wrong ? > > > > >Michenaud Laurent >- Adeuza - >[ Développeur Web - Administrateur Réseau ] > > >-- >To unsubscribe, e-mail: > >For additional commands, e-mail: > > > > >-- >To unsubscribe, e-mail: >For additional commands, e-mail: > > > > > -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: