tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Li <ampyx...@gmail.com>
Subject Re: Writing files accessible from a browser
Date Tue, 08 Aug 2006 02:14:44 GMT
you are right Moises, if you really wanna write to somewhere within
the webapp deploy folder, a better is to make a soft symbol link point
to the directory that stores the image,

<catalina_home>/webapps
   --- <your_web>
             ---- <image_dir>  -------------------> /tmp/images/

so next time update the war, even the folder is removed, the images
still at /tmp
we can just make a new <image_dir> and make a new link that points to
/tmp/images
whenever image needs to be written to ...

On 8/7/06, Moises Lejter <mlejter@teamsoftinc.com> wrote:
> I had a similar question, earlier... There is another issue here: you are
> right that WAR files are expanded back into a folder - at least by default -
> so one could still create a folder within the web app to write to, and which
> is visible to browsers...  Until one deploys an  updated WAR file.  At that
> point, tomcat will delete the old expanded WAR folder, in order to create a
> new one to deploy the new WAR file into - and in the process it will remove
> all files that were created before.  If these files are just transient
> anyway, then it does not matter...
>
> Moises
>
> "Li" <ampyx.li@gmail.com> wrote in message
> news:c197ef590608070130g6d42edc0hf27aaf8eae8748bf@mail.gmail.com...
> >
> > 1. even you deploy as war, later after start tomcat, it will still
> > generate a folder that actually tomcat uses normally. so in this case,
> > you still be able to use context path to write
> > 3. to write, you can always use context path or absolute path
> > defintion no matter is inside or outside, but after been written and
> > you wanna view, you have to define as URL,
>
>
>
>
> ---------------------------------------------------------------------
> 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
>
>


-- 
When we invent time, we invent death.

---------------------------------------------------------------------
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