Discussions

XML & Web services: Accessing servlet context path in a web service method

  1. Hi, I want to get the servlet context path in a web service method. This will be useful for me to access a config file on the server. Is it possible to get the servlet context in a webservice method OR is there any other way of getting the context path? I am using oracle.j2ee.ws.StatelessJavaRpcWebService. Will it make a difference if I use oracle.j2ee.ws.JavaRpcWebService. Any help will be appreciated. Thanks and Regards Prashant
  2. Not sure about Oracle implementation, but you can get it from javax.xml.ws.handler.MessageContext in JAX-WS. Thanks, Vinod http://blog.vinodsingh.com/