Ali,
There's nothing else that you need to do....Just check for any typos in the web.xml,
your code.
-- dims
--- 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
>
>
=====
Davanum Srinivas - http://webservices.apache.org/~dims/
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com