• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

context path

 
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does anybody know how can I access the context path (rooth path) of a web service?
I am looking for something equivalent to what you would do in a servlet: "getServletContext().getRealPath("/WEB-INF/xxxdirectory")".
Thanks,
Miki
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your only hope is probably proprietary features in your web services engine. Remember that not all SOAP messages are transmitted over HTTP...
 
Miki Muzsi
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Koskela,
I think I was not clear enough. I want to retrieve the context path (root path) from the web service itself, where this is running (for e.g. for making use of the I/O file system for different resources allocation). So not from the client. In other word how can I read from/create files from the web service from a subdirectory of the WEB-INF for e.g.
I this is what you understood initially what does this have to do with SOAP messages transmitted over HTTP ?
Miki
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok. I thought you meant context path as in "the concept defined in the Java Servlet specification", which means "http://host ort/myapp/mywebapp" etc...
Still, I believe there is no standard way of doing this.
 
Miki Muzsi
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, I've ment the root path of the application (web service). However it feels very strange there is not way to retrieve that. It seems to me very basic. Otherwise I'll just put it in a property file and change it each time the aaplication is deployed in a different location. But this is what I wanted to avoid.
Ok, thanks anyway.
Miki
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic