How about this:
Set up your init params for one of your servlets.
Make sure that this servlet get's pre-loaded first before the other
servlets.
Have the init() method of that servlet store all the parameters as
System properties and let the other servlets retrieve the parameters
as System properties instead of init params. A bit of a hack but it
works.
P.
On Tue, 14 Aug 2001 17:38:26 -0400
[EMAIL PROTECTED] wrote:
> I have multiple servlets in the same directory and they all get the same
> init-params from web.xml.
>
> Currently, I have 5 servlets and am required to repeat all the init-params
> 5 times, one for each servlet. So if one parameter changes, I have to
> change it five times in web.xml. I'd like to only have them in the web.xml
> file once and all servlets use them. How is this possible?
>
> One approach I took was to create a servlet that all my other servlets
> subclassed and all it did was grab the init-params. I couldn't get it to
> work.
>
> Any ideas?
>
> Thanks,
>
> JEB