From: markt Date: Fri, 1 Apr 2011 01:02:07 +0000 (+0000) Subject: Another context.xml tracking issue. This time if using just dir deployment. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=ebd2a2303c2c1203e3cf1467f53529a03f914530;p=tomcat7.0 Another context.xml tracking issue. This time if using just dir deployment. A changes in context.xml now triggers a redeploy rather than a reload (so the context.xml is re-read) git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1087534 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/catalina/startup/HostConfig.java b/java/org/apache/catalina/startup/HostConfig.java index 87beb13d2..758d63a85 100644 --- a/java/org/apache/catalina/startup/HostConfig.java +++ b/java/org/apache/catalina/startup/HostConfig.java @@ -1055,10 +1055,16 @@ public class HostConfig host.addChild(context); deployedApp.redeployResources.put(dir.getAbsolutePath(), Long.valueOf(dir.lastModified())); - if (xmlCopy != null) { - deployedApp.redeployResources.put( - xmlCopy.getAbsolutePath(), - Long.valueOf(xmlCopy.lastModified())); + if (deployXML && xml.exists()) { + if (xmlCopy == null) { + deployedApp.redeployResources.put( + xml.getAbsolutePath(), + Long.valueOf(xml.lastModified())); + } else { + deployedApp.redeployResources.put( + xmlCopy.getAbsolutePath(), + Long.valueOf(xmlCopy.lastModified())); + } } addWatchedResources(deployedApp, dir.getAbsolutePath(), context); } catch (Throwable t) {