Hi,
     I think the best example of implementing what you mentioned
is how Struts's ActionServlet refers to its config file struts-config.xml
in the web.xml, by using following code: 
   <init-param>
   <param-name>config</param-name>
   <param-value>/WEB-INF/struts-config.xml</param-value>
  </init-param>
Hope this helps,
Shengmeng Liu

----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 09, 2002 10:45 PM
Subject: Best way to store configuration data


> Hi
> 
> What is the best way to set a number of configuration variables to be 
> used in Struts.  Ie , I have variables like
> 
> WORKING_DIR=/var/webapp/tmp
> PIC_DIR=/var/webapp/pictures
> 
> 
> I need to be able to set them in one of the configuration files in the 
> WEB-INF dir so I can access the values from my servlets.  Should I use 
> the context-param tag in the web.xml file for tomcat? or is there
> a better way?
> 
> 
> Cheers
> 
> Antony
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 



Reply via email to