![]() |
Write in a file on server with jsp
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 |
Re: Write in a file on server with jsp
marga wrote:
> 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 |
| All times are GMT. The time now is 08:19 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.