apache-tomcat-6.0.16
jdk1.6.0_03

Dev box : Windows
Deployment box: Linux

Hi

I've read some other posts that seem to be asking similar questions
but I can't find the answer so far.
maybe someone here would be kind enough to give me a hint

I have a retail application that stores the product images in a database.
Each product can have many images and products are being uploaded all the time.

Fetching images from the database every time results in a clunky page
load so I want to cache the images to disk
the first time an item is accessed my cache manager checks the disk
cache to see if images for that item are available.
If not it loads them onto the disk.
this happens in the servlet that serves the item details up so the
images are in the disk cache before the request is forwarded to the
view (jsp)
In the jsp I access the images from the disk cache.

The problem is, the first time I access the item details the images
are written to the cache which resides directly under the
context root but they are not loaded in the view.
If I restart tomcat the images disply fine so I know all the caching
is working correctly.

I can't restart tomcat everytime I upload a new product so how can I
force tomcat to recognise the new images 'on the fly' so as to speak?
The application is running as the ROOT application on the server and
is the only application being served.

An example image might be
../apache-tomcat-6.0.16/webapps/ROOT/imagecache/8000030_main.jpg
(example)

I'm quite happy that the imagecache is deleted everytime I redeploy
the application because the application is starting to stabilise and
once I have this last problem ironed out
I will only be doing irregular maintenance. The faster loading of
images is more than enough compensation.

I can't use symbolic links to place the imagecache outside the
application space because I develop on Windows and deploy to Linux
(historical, nothing I can do about it)

Any ideas much appreciated.


Many thanks
lyallex

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to