Thanks for this fast and helpful response, Mark.  Having clarity
around this behavior is much appreciated!

> The behaviour is entirely as expected. Tomcat has no way of telling that
> the WAR has been updated while Tomcat is not running. Figuring out that
> something had changed would be non-trivial.
>
> The way to handle this simple. If you update a WAR file while Tomcat is
> shut down, you *must* delete any associated unpacked directory as well.
>
> Mark

--

On Wed, Jan 18, 2012 at 12:34 PM, Mark Thomas <ma...@apache.org> wrote:
> On 18/01/2012 20:31, Aron Roberts wrote:
>>   With apologies if this turns out to be a truly newbie question, or
>> has been answered in the archives (the MARC archives are
>> inaccessible today due to SOPA Blackout Day) ...
>>
>>   We've reproducibly observed the following with respect to
>> updating the contents of unpacked/exploded WAR directories,
>> and wish to ask whether this is the intended behavior:
>>
>>  With Tomcat 6.0.33, running on various recent Linux releases (e.g.
>> Fedora 15, Ubuntu 10), and with default settings of 'unpackWARs="true"
>> autoDeploy="true"' for the default host in
>> CATALINA_HOME/conf/server.xml:
>>
>>  1. Stop Tomcat.
>>  2. Copy an updated WAR file ('cspace-ui.war') to
>> $CATALINA_HOME/webapps (the default appBase directory).
>>  3. Start Tomcat.
>>
>>  Following Tomcat startup:
>>  * Any changes that had been made within the newly-copied 'cspace-ui.war' WAR
>> file, such as additions or deletions of files in the WAR ...
>>  * Are *not* also appearing within the corresponding unpacked/exploded WAR
>> directory, 'cspace-ui' - if that directory already existed at Tomcat startup.
>>
>>  This appears on its face to be problematic.  Following Tomcat
>> startup, we would intuitively expect that changes made within an
>> updated WAR file - copied when Tomcat was not running - would soon
>> appear, as well, within the corresponding unpacked/exploded WAR
>> directory.  And it isn't readily evident to us from this document why
>> it might not be so:
>>
>>  http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html
>>
>>  The following related behaviors do work as we would expect:
>>
>>  * If Tomcat is already running, any changes made to the
>> 'cspace-ui.war' WAR file, once copied to
>> $CATALINA_HOME/webapps (e.g. an autoDeploy scenario),
>> soon appear as well within the
>> corresponding unpacked/exploded WAR directory, 'cspace-ui.
>>
>>  * If the unpacked/exploded WAR directory, 'cspace-ui', corresponding
>> to the newly copied WAR file, 'cspace-ui.war', doesn't already exist,
>> it will be duly created on Tomcat startup.
>>
>>    Other details that may potentially be relevant:
>>  * This WAR's purpose is to simply package up a collection of HTML,
>> JavaScript, CSS, JSON and properties files, which are used by another,
>> Java-based web application.
>>  * Its context.xml and web.xml files are truly minimal, consisting of
>> just XML declarations and root elements.  (These can be gladly
>> provided, along with any other requested details, in a follow-up
>> upon request.)
>>
>>  Thoughts?

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

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

Reply via email to