File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes  Accessing servlet context path in a web service method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark " Accessing servlet context path in a web service method" Watch " Accessing servlet context path in a web service method" New topic
Author

Accessing servlet context path in a web service method

Prashant Venkata
Greenhorn

Joined: May 13, 2008
Posts: 3
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
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42600
    
  65
Getting at servlet information would be a platform-specific thing to do; e.g. the way to do it for Axis is described here. The Oracle documentation and/or forums might have more information on this.


Ping & DNS - my free Android networking tools app
Prashant Venkata
Greenhorn

Joined: May 13, 2008
Posts: 3
Hi Ulf,

Thanks for the reply! Sorry for multiple posts.

Is there any way to access the Session or Request and Response objects inside the web service method.

Thanks and Regards
Prashant
 
 
subject: Accessing servlet context path in a web service method