Configuration 从JAX-WS服务访问配置参数的不同方式

Configuration 从JAX-WS服务访问配置参数的不同方式,configuration,parameters,jax-ws,Configuration,Parameters,Jax Ws,据我所知,我可以通过使我的类实现ServletContextListener并使用ServletContext.getInitParamString来访问web.xml,但这很麻烦,因为只有一个类实例将接收contextInitializedServletContextEvent sce调用,所以我需要使ServletContext成为该类的静态成员 在部署时设置conf参数还有哪些其他方法?推荐的方法是什么 好的,看起来实际获取ServletContext的最佳方式是通过MessageCont

据我所知,我可以通过使我的类实现ServletContextListener并使用ServletContext.getInitParamString来访问web.xml,但这很麻烦,因为只有一个类实例将接收contextInitializedServletContextEvent sce调用,所以我需要使ServletContext成为该类的静态成员


在部署时设置conf参数还有哪些其他方法?推荐的方法是什么

好的,看起来实际获取ServletContext的最佳方式是通过MessageContext,如中所述