Sorry, I don't know how to do this for a bean.  Perhaps someone else who
works with beans could help.

Sorry about that.

-----Original Message-----
From: Adam Pfeiffer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 9:54 AM
To: Tomcat Users List
Subject: RE: How to load properties into tomcat 4.0.3?


I am still a bit confused.  I do not know what the servlet-name and
servlet-class are referring
to?

The Jsp Page it called TopNav.jsp and the bean is called PictureBrowserBean.
I want to have the
bean PictureBrowserBean be able to access the extra parameter.  In this
case, the location of the
properties file. Here i my guess at what I would do

<servlet>
 <servlet-name>TopNav</servlet-name>
 <servlet-class>PictureBrowserBean</servlet-class>
  <init-param>
    <param-name>propFile</param-name>
    <param-value>/opt/jakarta-tomcat-4.0.3/webapps/trips-dev</param-value>
  </init-param>
</servlet>

Is this correct?  I am going to try this, but I am a bit short on time right
now.  Thanks again
for your help.

Adam


--- Subir Sengupta <[EMAIL PROTECTED]> wrote:
> You can do something like this in your web.xml
> 
> <servlet>
>  <servlet-name>somename</servlet-name>
>  <servlet-class>someclass</servlet-class>
>   <init-param>
>     <param-name>param1</param-name>
>     <param-value>somevalue</param-value>
>   </init-param>
> </servlet>
> 
> You can then call getServletConfig().getInitParameter("param1") from the
> init method of the somename servlet.
> 
> Hope this helps,
> Subir
> 
> -----Original Message-----
> From: Adam Pfeiffer [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 04, 2002 10:52 PM
> To: [EMAIL PROTECTED]
> Subject: How to load properties into tomcat 4.0.3?
> 
> 
> Hello,
> I have a bean that uses the Properties Object.  Currently, on each jsp
that
> calls that bean I have
> to do a bean.setPropsDir() which sets the directory where to find the
> properties file.  Is there a
> way in server.xml, web.xml or some other way that I can put in a variable
> that will define the
> directory where the properites file exists so that the class can access
> this?  
> 
> Thanks.
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> 
> --
> 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]>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
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