views:

52

answers:

1

As far as I know I can access the web.xml <context-param>s by making my class implement ServletContextListener and use the ServletContext.getInitParam(String) to read them, but it´s cumbersome as only one instance of the class will receive the contextInitialized(ServletContextEvent sce) call, so I need to make the ServletContext an static member of the class.

What other ways exist of setting conf params at deployment time and what are the recommended ones?

A: 

Ok it seems that the best way of actually getting the ServletContext is via the MessageContext as described in http://stackoverflow.com/questions/261348/how-can-i-access-the-servletcontext-from-within-a-jax-ws-web-service

ecerulm