Meaningless Drivel is fun!
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
Rancher

Joined: Mar 22, 2005
Posts: 42958
    
  73
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.
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
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Accessing servlet context path in a web service method
 
It's not a secret anymore!