Odd
Personally - I would do the following:
Make all calls to the servlet and the servlet does this:
1) Sanity check the incoming path
2) Check for the existence of the image (using
ServletContext.getResource(path)
3) If not exists - load the image from the db and store to disk
4) forward to image via
request.getRequestDispatcher(path).forward(request, response)
The above assumes the image cache directory is part of the webapp and
visible to ServletContext.getResource
If the image cache directory lives outside the webapp - then I amazed
that the default servlet was ever working. In which case - you can use a
symlink.
If you are stuck on windows or all the above still doesn't work - then
you can still do this:
0) In apache - you can map the image cache dir to some location - or
have tomcat do that too in its own webapp
1) Sanity check the incoming path
2) Check for the existence of the image using a filesystem call
3) If not exists - load the image from the db and store to disk
4) redirect to the static image path
-Tim
Lyallex wrote:
Hi
I'll try to explain in as few words as possible.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org