Open glassfishrobot opened 13 years ago
Reported by markus_franke
@mpotociar said: Reassigning to Jitu.
ernestojpg said: It would be great to be able to access the ServletContext from, for instance, the @PostConstruct method.
Link for the discussion: http://www.java.net/node/673651
Was assigned to jitu
This issue was imported from java.net JIRA WSIT-1515
Actually the ServletContext of a deployed WS is accessible in a WS by means of the inejected @Resource. Injection of the @Resource WebServiceContext works fine, but accessing the ServletContext from there only works in the WS methods but not in the startup / init phase.
Seealso in discussion board: http://www.java.net/forum/topic/glassfish/metro-and-jaxb/access-servletcontext-jax-ws-web-service-0