I was very happy to see the changes to automatic deployment, and that customized context.xml files in conf/Catalina/localhost/<appname>.xml are preserved when a war file is replaced on the server. However, when using the ant tasks that come with TCD (and I suspect when using the Tomcat manager, although I have not tested that), it appears that the webapp is deleted and then uploaded (as opposed to just being replaced), which is causing the customized context.xml file to be lost and replaced with a default version. === Reply from Mark Thomas === Hmm. It looks like the update command does an undeployment followed by a deploy rather than a replacement of the WAR file and a redeploy. You aren't going to be able to fix that without code changes to Tomcat. Changing the behaviour seems reasonable here. I suggest you open a bugzilla issue for this.
This has been fixed in 8.0.x for 8.0.4 onwards and in 7.0.x for 5.0.53 onwards.
Wow, thank you!!!
Reviewing r1577199 Besides two small issues that I mentioned in "Re: r1577199" thread on dev@, and bug 56273, one more high-level one: The logic in update=true case in protected synchronized void deploy (PrintWriter writer, ContextName cn, String tag, boolean update, HttpServletRequest request, StringManager smClient) { is as follows: 1. mark webapp as serviced 2. delete old war 3. upload new war, that means to read the body of a PUT request and save it as file 4. trigger deployment, remove serviced mark If step 3. fails due to aborted I/O, the old application will become undeployed, deleting its custom configuration if there is any. It would be better to upload it to a temporary name and rename the file. A temporary name can be created with java.io.File.createTempFile(,,dir).
I've fixed all of these issues for 8.0.x (8.0.4 onwards) and 7.0.x (7.0.53 onwards)