users
[Top] [All Lists]

Re: [cinjug-users] properties file in WAR

To: "Timothy Dennison" <denti07@xxxxxxxxx>, "CinJUG \(E-mail\)" <users@xxxxxxxxxx>
Subject: Re: [cinjug-users] properties file in WAR
From: "James Carman" <james@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 14 Jun 2003 12:52:14 -0400
Delivered-to: mailing list users@cinjug.org
Mailing-list: contact users-help@cinjug.org; run by ezmlm
References: <20030614101514.71356.qmail@web40303.mail.yahoo.com>
You can put it in the WEB-INF/classes directory as Tim has suggested, or it
can be in the top-level of any of the jars in the WEB-INF/lib directory and
it will also be found.  If you're using Tomcat.  Try doing a
System.out.println() on one of your classes' ClassLoader object.  It will
give you a rundown of all of the places where it will look for resources.
It's VERY helpful when trying to figure out where things are loaded from and
in what order.  The docs help too. :-)  I would suggest using the
WEB-INF/classes directory, though.  That's the absolute first place it will
look.


----- Original Message ----- 
From: "Timothy Dennison" <denti07@xxxxxxxxx>
To: "CinJUG (E-mail)" <users@xxxxxxxxxx>
Sent: Saturday, June 14, 2003 6:15 AM
Subject: Re: [cinjug-users] properties file in WAR


> You should be able to put the file in WEB-INF/classes
> as this location will always be on the classpath.
> tim
>
> --- "Herbers, Joe" <joe.herbers@xxxxxxx> wrote:
> > I'm trying to create a WAR file to deploy an app.
> > One class references a resource file called
> > message.properties via the following code.  Where in
> > the WAR should/can I put the properties file?  In
> > the root?  I think it needs to be in the classpath,
> > so I do I need to put a CLASSPATH statement in
> > Manifest.mf or can I put it somewhere that will
> > automatically be in the classpath?  Thanks.
> >
> >             bundle =
> > ResourceBundle.getBundle("Message",userLocale);
> >
> >
>
>
> =====
> Timothy S. Dennison
> Consultant
> Cardinal Solutions Group
> client: (513)412-3943
> office: (513)984-6700
> cell:   (513)706-0365
> email: tdennison@xxxxxxxxxxxxxxxxxxxxx
>
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
>
>
>


<Prev in Thread] Current Thread [Next in Thread>