The init params that you have setted is specific to
that servlet only (IMHO)
you have to set like to inorder for all
servlets/classes to them
<webapp>
<context-param>
<param-name>foo</param-name>
<param-value>foo value</param-value>
<description>foo desc</description>
</context-param>
<servlet > .. </servlet>
<mimemapping> ..
</webapp>
--- Ali Rahmanzadeh <[EMAIL PROTECTED]> wrote: > Dear
all,
> I have been looking through the archives to find
> out
> how to pass an initialization parameter to my axis
> application. One would have thought that since this
> is such a basic
> requirement, there will be an obvious way to achieve
> it.
>
> As was suggested in some postings in the archives, I
> made my main
> service class to implement ServiceLifecycle and in
> the init()
> method I try to obtain the value of an init-param
> that I
> set in my axis's web.xml. But unfortunately,
> getInitParameter method
> return null. Here are the relevant part of my code:
>
> In my ../webapp/axis/WEB-INF/web.xml:
>
>
> <servlet>
> <servlet-name>AxisServlet</servlet-name>
> <display-name>Apache-Axis Servlet</display-name>
> <servlet-class>
> org.apache.axis.transport.http.AxisServlet
> </servlet-class>
>
> <init-param>
> <param-name>WebRepositoryPath</param-name>
> <param-value>anypath</param-value>
> </init-param>
> </servlet>
>
> //----------------------------------------
>
>
> In my main service calss which implements
> ServiceLifecycle:
>
>
> public void init(java.lang.Object context) throws
> ServiceException {
>
> ServletEndpointContext ctx =
> (ServletEndpointContext)context;
>
> ServletContext servletContext =
> ctx.getServletContext();
>
> servletContext.log(" The value of init-param:
> ");
>
>
servletContext.log(servletContext.getInitParameter("WebRepositoryPath");
> ...
> }
>
>
>
> //----------------------------------------
>
> Is AxisServlet the right servlet to associate the
> init-param with?.
>
>
> Thanks
>
> Ali
>
>
http://mobile.yahoo.com.au - Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.