tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Uploading Images - Refresh Directory
Date Tue, 10 Nov 2009 20:43:54 GMT
Hash: SHA1


On 11/10/2009 9:14 AM, mshowers wrote:
> Looking for some help - I am using DWR (ajax) to upload image files to my web
> app. 
> The app is running on Tomcat v6.0.
> I'm putting the files into a directory in WebContent\images or
> WebContent\images\<sub directories>

Is that directory inside the deployment directory of your webapp? Don't
do that!

> When I upload the images, I then want to display them on my page. heres the
> problem[:]
> Even if I reload the page, the images will not appear on the page untill I
> go into the eclipse IDE and "REFRESH" the WebContent or Images directory.

What does REFRESH do in Eclipse? Does it re-deploy/reload the webapp? If
so, then you're hitting Tomcat's directory-caching behavior which makes
it difficult to put new files into the deployment directory while Tomcat
is running. Again, don't do that!

> Any suggestions as to how I can get around this?

Put your files somewhere else, and map a URI in your web application to
a servlet that can fetch the files (and/or directory listings) from that
other directory.

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message