We would like to configure Tomcat in the following way (where X
-SL-> Y
represents a symlink named X
pointing to a path Y
):
CATALINA_HOME/webapps
-SL->/var/data/nas/deploymentconfiguration_a
/var/data/nas/deploymentconfiguration_a/myapp.war
-SL->/var/data/nas/wars/app1.war
The idea is to be able to configure which applications are deployed on a particular Tomcat instance by having a series of symlinks to WARs in a deployment configuration folder, and having anoher symlink named webapps from CATALINA_HOME to a particular deployment configuration folder.
Many Tomcat instances would point to the same deployment configuration folder.
I hope that's clear :S
The whole /var/data/nas
tree would be read-only.
In trials, the main problem we are running up against is that Tomcat is obviously trying to explode the war into the deployment configuration folder (which it considers to be appBase
), which is read only.
Is there a way to get Tomcat to unpack its wars into some kind of local work folder (I don't think there is, based upon a quick scan through the source code), or is the only way to proceed to stop Tomcat from exploding the war files in the first place?
We are using Tomcat 6.
Edit
We are going to be running multiple Tomcat instances against the same configuration. So there could be 10 Tomcats running against deploymentconfiguration_a
and 10 against deploymentconfiguration_b
, but there could be some commonality between the actual WAR files in each deployment configuration (ie deploymentconfiguration_a
could have WARs 1, 2 and 5 while deploymentconfiguration_b
could have WARs 1, 5 and 7).
The reason it is RO is to avoid accidental modification of a particular configuration, and also to avoid one instance of Tomcat treading on the toes of another.