tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: Make uploaded files survive to re-deploy
Date Fri, 04 Jul 2008 15:39:47 GMT
> From: Johnny Kewl [mailto:john@kewlstuff.co.za]
> Subject: Re: Make uploaded files survive to re-deploy
>
> We us the Apache web server as well, and we dump image
> files to that....

That adds unnecessary complexity and impacts performance for dynamic content.

> > If I use an external directory, it would be difficult
> > to make those files accessible to the webpages...

It's not really difficult.  Define a <Context> element for an additional webapp that
targets the external directory via a docBase attribute, and place that <Context> element
in conf/Catalina/[host]/[newAppName].xml; use something like "images" (without the quotes)
for [newAppName].  Tomcat's DefaultServlet will happily retrieve and display images or other
static content from there when referenced via http://[host]/[newAppName]/[file].[type].

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus
for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.

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