tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Quilici <r.quil...@chem.usyd.edu.au>
Subject Re: getRealPath and war file
Date Thu, 10 Aug 2006 04:07:10 GMT
Mikolaj Rydzewski wrote:
> Romain Quilici wrote:
>> My pb is more to write in a given directory(must be accessible with a 
>> url), than to read.
>> And I would prefer this directory to be located in my webapp.
> Use directory outside webapp and then map it with alias, or some kind 
> of dispatcher servlet/filter.
>
> It'll help you to redeploy webapp and not to loose uploaded/saved files.
>
Actually,
in my application, files are temporary. So even if they are deleted in 
doesn't matter.
What I mean is images are pushed inside a client browser when they are 
generated, but then are no longer used.
I prefer to create the directory within my application, to avoid 
permissions issues
As I understood, context.getRealPath("/"); will return the context of my 
application, even if my app is deployed within a war(as soon as 
UnpackWars is set to true in Tomcat).
So I can deal with this command. I will provide anyway a mechanism to 
check if context.getRealPath("/"); is null, in such case the application 
should take the values from init parameters
Regards
Romain



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message