Hi, how does this sound to you: - write a dedicated servlet that reads in the configuration-info either from - a dedicated configuration-file (your private format... xml or properties) - init-param's specified for this servlet - context-param's - load this servlet at startup - use the doGet() to provide a listing of the configuration-parameters (for debugging) - create a java.util.Property object and make it accessible through static methods to all classes in need for it in the same JVM
That's how I would do it... Alexander Jesse -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 3:46 PM To: [EMAIL PROTECTED] 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]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>