axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: Why ServletContext in ServletEngineConfigFactories ?
Date Tue, 18 Nov 2003 20:30:14 GMT
Guillaume Sauthier wrote:

> Hello
> As I continue my work for Axis integration in JOnAS, I fall on littles
> problems :)
> And this one is blocking !
> I want to overridde the behavior of EngineConfigurationFactoryServlet
> with my own Factory (JServletEngineConfigurationFactory). Because I want
> Axis to take only a classic deploy.wsdd and combine a base
> server-config.wsdd with the deploy.wsdd, specified in web app, at
> runtime.
> And so on, I have a web.xml looking like this one:
> <web-app>
>  <servlet>
>   <servlet-name>AddressBook</servlet-name>
> <servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class>
>   <init-param>
>    <param-name>axis.serverDeployFile</param-name>
>    <param-value>WEB-INF/myDeploy.wsdd</param-value>
>   </init-param>
>  </servlet>
>  <!-- missing servlet-mappings ... -->
> </web-app>
> 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)

View raw message