tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: [Tomcat 7] Why can't you use automatic deployment and exploded WAR when docBase is outside appBase?
Date Tue, 07 Aug 2012 16:39:09 GMT
Hash: SHA1


On 8/6/12 3:26 PM, Miguel Almeida wrote:
> Consider the following context file jamesbond.xml in 
> $CATALINA_BASE/conf/[engine_name]/[host_name]):
> <Context docBase="/srv/apps/jamesbond.war" unpackWAR="true" 
> debug="0" privileged="true"> <Environment name="my.env" value="VAL"
> type="java.lang.String" override="true"/> </Context>
> *1)* In Tomcat 6 you'd update the war at /srv/apps and it would 
> automatically be redeployed and exploded.
> However, in Tomcat 7 this isn't happening.
>> From the docs
>> (, a
> new important text that wasn't in 6 reads: unpackWARs - (...) WAR
> files located outside of the Host's *appBase* will not be
> expanded.
> And in 
- - When using automatic deployment, the docBase defined by an XML
> Context<>file
should be outside of the
> appBase directory. If this is not the case, difficulties may be
> experienced deploying the web application or the application may be
> deployed twice. The deployIgnore attribute can be used to avoid
> this situation.
> Both these rules means you can't have automatic deployment of files
> outside appBase and explode them (into appBase).

Do you mean "automatic deployment" or "automatic redeployment"? If you
want to update a WAR file that is outside of the appBase, then update
the WAR file and then 'touch' the XML file in

> Why is this? How can one have the same behaviour as in Tomcat 6:
> have the war* outisde appBase*, use a context xml like the one
> above and have the application exploded.

Do you really care about the WAR file being exploded? If this is
really a complaint about your question #2 (handled by others
separately within this thread), then you should be using the temp dirs
instead of getRealPath and you won't have to worry about the lack of
WAR-explosion anymore.

- -chris
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools -
Comment: Using GnuPG with Mozilla -


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

View raw message