This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing servlet context path in a web service method

 
Prashant Venkata
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic