getting the absolute path of the app

Hi!

I'd like to obtain the absolute path of the folder of the application within the code of the web service.

How can I do this?

I tried with

File f = new File(".");

String p=f.getAbsolutePath();

but it does not work

With best regards,

Sorin

[301 byte] By [Sorin_Ciolofana] at [2007-11-27 6:18:31]
# 1

not sure how your web service is structured...

If u're able to access the HttpRequest object, u can simply do this: HttpServletRequest.getContextPath(), and this should give u the path to the Tomcat (or whatever server u're running) directory where yr web service application is in.

hope this help..

JWKC-5ivea at 2007-7-12 17:32:29 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...