So, how can i modify my interface so that it reads
the file properties "db" in WEB-INF/config ?

> -----Message d'origine-----
> De : Glenn Nielsen [mailto:[EMAIL PROTECTED]]
> Envoy� : mardi 27 ao�t 2002 15:32
> � : Tomcat Users List
> Objet : Re: Loading properties files
> 
> 
> java.util.ResourceBundle.getBundle() uses the current 
> ClassLoader to load
> your resource bundle.  That means that your properties have 
> to either be
> located with a jar file in /WEB-INF/lib or in your 
> /WEB-INF/classess directory.
> 
> This isn't a limitation of Tomcat, this is how resource bundles work.
> 
> Regards,
> 
> Glenn
> 
> randie ursal wrote:
> > 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" <[EMAIL PROTECTED]>
> >> To: <[EMAIL PROTECTED]>
> >> 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").getSt
> ring("sche
> >> 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:
> >> <mailto:[EMAIL PROTECTED]>
> >> For additional commands, e-mail:
> >> <mailto:[EMAIL PROTECTED]>
> >>
> >>
> >>
> >> -- 
> >> To unsubscribe, e-mail:   
> >> <mailto:[EMAIL PROTECTED]>
> >> For additional commands, e-mail: 
> >> <mailto:[EMAIL PROTECTED]>
> >>
> >>
> >>
> >>  
> >>
> > 
> > 
> > -- 
> > To unsubscribe, e-mail:   
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: 
> > <mailto:[EMAIL PROTECTED]>
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to