>>>>> "antony" == antony <[EMAIL PROTECTED]> writes:
antony> Hi antony> What is the best way to set a number of configuration variables to be used in antony> Struts. Ie , I have variables like antony> WORKING_DIR=/var/webapp/tmp antony> PIC_DIR=/var/webapp/pictures antony> I need to be able to set them in one of the configuration files in the WEB-INF antony> dir so I can access the values from my servlets. Should I use the antony> context-param tag in the web.xml file for tomcat? or is there antony> a better way? Those sound like they would be best as "init parameters" for your servlet. Look in your web.xml for where you set up the "servlet" element for the "action" servlet. You might notice the "init-param" elements, for things like "config", "debug", and "detail". You can do the same thing for your directory variables. Use "Servlet.getInitParameter()" to get the values in your servlet code. Obviously, you'll have to know WHICH servlet you intend to reference these variables from, so you'll have to put them as "init-param"s for the correct servlet in the "web.xml". -- =================================================================== David M. Karr ; Best Consulting [EMAIL PROTECTED] ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004) -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>