Hi, This requirement is very common. The way I like to do it is by having one web.xml with an ant token for the value of the parameter. Then the various deploy targets in our ant scripts copy the web.xml with filtering to fill in the token value. We have properties files for our different environments.
So it looks like this: web.xml: <init-param> <param-name>dbUrl</param-name> <param-value>@dbUrlToken@</param-value> </init-param> Ant script: <filter token="dbUrlToken" value="jdbc:oracle:..." /> <copy to="..." src="..." filtering="true"> <fileset ... includes="web.xml" /> </copy> I hope the above is enough to explain the idea, Yoav Shapira Millennium ChemInformatics >-----Original Message----- >From: Curt Wilhelm [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, January 21, 2003 2:16 PM >To: [EMAIL PROTECTED] >Subject: config.getInitParameters > >Hi, > >I'd like to use the a server side configuration option to set a >parameter value that can be used inside a jsp or servlet. I don't want >to use the context-param of web.xml because I need a different value in >the dev, test and production servers, and I don't want to have different >src files for each installation. I'd like to use >config.getInitParameter in a servlet or jsp to retrieve the parameter >value. > >Does anybody have any suggestions on how to accomplish this? > >Regards, > > >Curt Wilhelm > > > >-- >To unsubscribe, e-mail: <mailto:tomcat-user- >[EMAIL PROTECTED]> >For additional commands, e-mail: <mailto:tomcat-user- >[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
