Hello all.
I'm in need to save files (primitive cache) in my servlet. But when
i'm trying to create such file, it is being created outside webapp
working folder (in Resin startup folder), when i need it to create
files in webapp folder. I've tried to set app-dir to appropriate path,
but it changes nothing ... I want to work on relative path, because
application can work on server side, and as standalone.
Is there any configuration issue, that i missed? Or should i be
looking for webapp folder, and change folder context in some way?
For any help thanks in advance.
Arne Vajhøj - 11 Mar 2008 02:57 GMT
> I'm in need to save files (primitive cache) in my servlet. But when
> i'm trying to create such file, it is being created outside webapp
[quoted text clipped - 4 lines]
> Is there any configuration issue, that i missed? Or should i be
> looking for webapp folder, and change folder context in some way?
getServletContext().getRealPath("/dir/file")
Arne
Prasalek.Michal@gmail.com - 13 Mar 2008 12:56 GMT
> getServletContext().getRealPath("/dir/file")
Thanks, it works well now :).