users@glassfish.java.net

Relative path on web applications?

From: <glassfish_at_javadesktop.org>
Date: Sat, 13 Sep 2008 04:32:56 PDT

Hi!

I have a web application, that has a couple of packages. One of the packages has only wsdl files. From another package, I need to access this wsdl file in order to call a web service. I have the following code line:
url = new URL(baseUrl, "file:../../wsdl/PackagerEndpoint.wsdl");
However this only works in console application, because in console application I know that when I call this code, the relative path is at the class file which belongs to the above mentioned code. But when I try to do the same in a web application, I can't seem to find out where the relative path is at, when I call this line of code. Unfortunately the exception doesn't tell me either. I've tried
 System.getProperty("user.dir");
but this didn't really help either.

Can someone tell me where the relative path starts when I call this code in a web application? (I can only get it to work with absolute path now)

Thank you in advance!

Zoli
[Message sent by forum member 'sz_zoli' (sz_zoli)]

http://forums.java.net/jive/thread.jspa?messageID=299199