File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Context, Path Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Context, Path Question" Watch "Context, Path Question" New topic
Author

Context, Path Question

John Groller
Greenhorn

Joined: May 08, 2008
Posts: 5
Hello JavaRanch!

I've got a class in a WAR. It's not a servlet, it's just a straight up class. However, it will be invoked when a SOAP call comes in from our vendor.

To load a Bean that I need, I'm doing this...



My problem is that no relative path that I use works. Physical paths do work, but since I'm developing on a Windows box and will be deploying to AIX boxes, physical paths won't match up.

Is there a way for me to determine the context root of the WAR in a class that's not a Servlet (and therefore does not have an HttpServletRequest object)? I read somewhere that I could grab the SOAPContext and use that, but that just seemed like a lot of work to do something simple.

Thanks in advance for any help.
John
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Context, Path Question