I was finally able to figure this out.  I wasn't aware that a properties
file needed to have a .properties extension for a PropertiesResourceBundle
to pick it up.  Other than this - the config was fine.  I still haven't seen
any documentation on that extension requirement, as it isn't mentioned
specifically in Sun's docs.  I will now hang my head in shame.  This is
something I had forgotten...

Thanks for your help.

Randy

----- Original Message -----
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, August 27, 2002 10:37 PM
Subject: Re: PropertyResourceBundle problems


>
>
> On Tue, 27 Aug 2002, Randy Secrist wrote:
>
> > Date: Tue, 27 Aug 2002 21:58:00 -0600
> > From: Randy Secrist <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: Tomcat Users List <[EMAIL PROTECTED]>
> > Subject: Re: PropertyResourceBundle problems
> >
> > Lets try this route then:
> >
> > Is there ANY way to get the actual class path the TC class loader uses
to
> > load classes at runtime from within a servlet out of ANY context?
> >
>
> No.  The problem is that there *is* no such thing as a "class path for the
> TC class class loader used to load classes at runtime from within a
> servlet".  The classpath system property is global to the entire JVM that
> is running Tomcat, so it is (obviously) not capable of representing the
> set of classes available to each individual webapp.
>
> Class loaders only know what repositories they are loading classes (and
> static resources) from -- in the particular case of Tomcat, they are all
> subclasses of java.net.URLClassLoader so you can call getRepositories() --
> but it won't help you much.  See the following docs for more details:
>
>   http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html
>   http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html
>
> The real issue is that there's something you are doing wrong that nobody
> has been able to figure out yet.  Thousands of apps all over the world
> (including every app running Struts) is able to load resources from
> /WEB-INF/classes or /WEB-INF/lib if they use the correct invocation.
>
> Note that if you really did copy your properties file to
> "/web-inf/classes" instead of "/WEB-INF/classes", give up and start over
> -- pretty much everything about servlets and JSP pages is case sensitive.
>
> Craig
>
>
> > This is obviously not stored in the System.properties - is it kept
> > internally anywhere?
> >
> > Randy
> > ----- Original Message -----
> > From: "Randy Secrist" <[EMAIL PROTECTED]>
> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > Sent: Tuesday, August 27, 2002 9:21 PM
> > Subject: Re: PropertyResourceBundle problems
> >
> >
> > > I did copy the props file to the web-inf/classes - however TC still
> > doesn't
> > > know what to do with it...
> > >
> > >
> > > ----- Original Message -----
> > > From: "randie ursal" <[EMAIL PROTECTED]>
> > > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > Sent: Tuesday, August 27, 2002 9:05 PM
> > > Subject: Re: PropertyResourceBundle problems
> > >
> > >
> > > > i have that same problem, and i solve it through the efforts of some
> > > > people on this
> > > > list.
> > > >
> > > > i just place my property file on WEB-INF/classes of my web
> > > > application...that's it
> > > > everything works fine now. =)...no need to place it on other
> > repositories.
> > > >
> > > > this is my code in reading the property file:
> > > >    ResourceBundle oRes =
PropertyResourceBundle.getBundle("MyProperty");
> > > >
> > > > Randy Secrist wrote:
> > > >
> > > > >Hello,
> > > > >
> > > > >This is probably a very simple question - but I want to have a
servlet
> > > load
> > > > >a PropertyResourceBundle and am having problems getting TC to find
the
> > > > >resource...
> > > > >
> > > > >I want to do this:
> > > > >props = (PropertyResourceBundle)
> > > > >PropertyResourceBundle.getBundle("SystemConfig");
> > > > >
> > > > >I have tried moving the properties file into the WEB-INF/classes,
> > > > >COMMON/classes, packaging it with my webapp.jar, and dropping it in
> > > > >COMMON/lib, and WEB-INF/lib...  I even moved it into bootstrap.jar
> > since
> > > > >that is apparently the System classpath TC uses.  Still no luck...
> > > > >
> > > > >Everytime I get a java.util.MissingResourceException
> > > > >
> > > > >What am I doing wrong?
> > > > >
> > > > >Randy
> > > > >
> > > > >
> > > > >--
> > > > >To unsubscribe, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > > >For additional commands, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > > --
> > > >
> > > > Randie V. Ursal
> > > > Design Engineering Department
> > > > NEC Telecom Software Philippines, Inc.
> > > > office : +63(032) 233-9142 (loc.3119)
> > > > mobile : +63(0917) 467-8244
> > > > email  : [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]>
>


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

Reply via email to