Alan Cooper wrote:
I have a tomcat5 installation running on a RHEL ES3 box which I am
having some issues with.
I have a symlink back to an images directory which is outside the
context. This works fine and I can read the images etc.
The problem occurs when I redeploy the context through the manager
webapp: when the context is removed. the removal script seems to
follow the symlinks, thus deleting my images directory.
Any suggestions on how to avoid this?
If they are part of the web-app then they should be inside the WAR in
the first place. The idea of the WAR is that its a self-contained
COMPLETE web-application with no (few) external dependancies.
If they are an external repository your web-app can look into and work
with, then you need to define some level of logical seporation in your
web-app (like an API). This maybe as simple as defining a property
key/value with the absolute path to the top-level directory of the
repositorory then making all file access to it resolve the system path
before using it. By doing that you can now move your images out of the
web-app WAR file area and put them anywhere. This is only useful if
your servlets want file access to the repository but it sounds like you
want HTML access to "images/foobar.gif" so they can be served directly.
--
Darryl L. Miles
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]