axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Sauthier <>
Subject Re: Why ServletContext in ServletEngineConfigFactories ?
Date Wed, 19 Nov 2003 08:52:22 GMT

> > And I wanted to access the init param through ServletContext but the
> > getInitParam return context-param values, not init-param values of the
> > servlet element.
> > And i cannot access ServletConfig (which contains the param I want) from
> > ServletContext.
> >
> > So I ask you why there is ServletContext in place of ServletConfig ? Is
> > there a reason to keep this or can you change the Context with a Config
> > object easily ?
> >
> > Have a ServletConfig in place of ServletContext allow the user to have
> > more than 1 AxisServlet (with different configs) in a WebApp.
> >
> > What do you think about this ? Can this be changed ?
> I see what you want. And dont see any reason why it cannot be changed,
> if the old mechanism is retained. Really AxisBaseServlet needs to cache
> config and context and the Axis configuration, then provide a property
> accessor so that config from the wsdd file, web.xml and servlet-specific
> section of web.xml are all merged (with the appropriate priorities)

What I propose is the following :
We do not change the COnfgFatcoties interfaces (keep working with new
Factory(Object)). The EngConfFacServlet use a ServletConfig instead of a
ServletContext param (for access init-param of web.xml).

The Servlet Factory will look for some properties in ContextServlet :
axis.BaseConfigFile -> specify the default server-config.wsdd to use (if
omitted, use classic org/apache/axis/server/server-config.wsdd file)
axis.CommonConfigFile -> specify a common deploy file for all Axis
Servlet declared in the web.xml (can be null too if servlet dont share
any properties)

And the factory will look too in ServletConfig object for Servlet
specific configuration informations :
axis.ServletConfigFile -> the specific deploy.wsdd file

At the end, when all these files are loaded and used as WSDDDeployment,
they are merged together
servlet -> common -> base
and this final WSDDDeployment element is returned as the

I can implement this and make a patch if you think it's good enough.


View raw message