Re: init parameters!

From: Edoardo Causarano <>
Date: Fri, 28 Oct 2005 15:49:48 +0200

Shure, put everything you wish in the web.xml of the uncooked war fed
to wscompile. To do my init stuff I add a
javax.servlet.ServletContextListener implementation declared in the
web.xml and process servlet lifecycle events from there (as far as
I've understood SEI implementation lifecycle is not tied to
application, session or request scope in any way but is at the
container's mercy, so don't use that).


A baby seal walks into a club...
Il giorno 17/ott/05, alle ore 21:40GMT+02:00, Oancea Daniel ha scritto:
> hi everybody,
> I have a question. It's possible to use init parameters inside of  
> deployment descriptor, something like they used in a web.xml  
> descriptor servlets?
> <servlet>
>  <description>Web Services</description>
>  <display-name>Stats Service Interface</display-name>
>  <servlet-name>Stats</servlet-name>
>  <servlet-class> enthrone.dispatcher.statsService.StatsServiceImpl</ 
> servlet-class>
>  <init-param>
>                 <param-name>param1</param-name>
>                 <param-value>value1</param-value>
>         </init-param>
>  <load-on-startup>0</load-on-startup>
>   </servlet>
> I need that becouse I thinking to load some value for variables,  
> using getInitParameter() method in the implementation of the web  
> service:
> public void init(Object obj){
>  endPoint = (ServletEndpointContext) arg0;
>  servletContext = endPoint.getServletContext();
>  value = servletContext.getInitParameter("param1");
> }
> Any help it will be appreciated!
> Daniel