Hello Romain,

Is there no way you can use the temporary working directory (javax.servlet.context.tempdir)? I don't know what "pushing inside a client browser" means, but as you mentioned the files are temporary, this sounds like the place to put them.. Also, you won't need to worry about maintaining some extra directory after deployment, and this is a portable solution.

Regards,
Dies

Romain Quilici wrote:
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to