Hello,
I am developing a simple jsp page, and I would like to write in a
test.txt File on server (on which I publish the page) and test.txt is
writable for all.
I don't know the absolute path where my web application resides.
I don't found nothing with Google.
Thanks,
Paolo
Arne Vajhøj - 03 Mar 2008 00:49 GMT
> I am developing a simple jsp page, and I would like to write in a
> test.txt File on server (on which I publish the page) and test.txt is
> writable for all.
> I don't know the absolute path where my web application resides.
application.getRealPath("/foobar.txt") will give you the real
path to http://yourserver/yourwebapp/foobar.txt !
I don't think this is a good solution.
You may not have write permission.
And it will not be multi user safe.
Arne