I'm not sure if ResourceBundle is what you'll want.  So here are a few
more things to look at, just in case.


java.util.Properties has a load method that can take in an InputStream

javax.servlet.ServletContext has a getResouceAsStream method
which will get you the properties file ( from web app context )

also, there is a way to setup a JSP inside of the web.xml file so that you
can give it init parameters.  you should look it up in the web.xml spec...


fernando


On Sun, 8 Jul 2001, Batsheva Raviv wrote:

> it is very helpful,
>
> Thank you,
> Batsheva
>
>
> -----Original Message-----
> From: Wyn Easton [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, July 08, 2001 3:50 AM
> To: [EMAIL PROTECTED]
> Subject: Re: calling a config file from bean
>
>
> Look at ResourceBundle in the java docs.
> You can use the getBundle()method to load property
> files.  The classpath is searched for the property
> file.  So you can put the property file in you web
> apps. "classes" directory or in a jar file under
> "lib".
>
> --- Batsheva Raviv <[EMAIL PROTECTED]> wrote:
> > has anyone wrote a method to read a config file from
> > a bean?
> > how can I call a config file from the bean.
> > if I use Servlet I can use the web.xml file, but I
> > call a bean file from the
> > jsp page.
> > where should I put the config file? do I have to
> > hard code the path to the
> > config file.
> >
> >
> >
> > Thank you,
> > Batsheva
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/
>

Reply via email to