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

Reply via email to