From ebd2a2303c2c1203e3cf1467f53529a03f914530 Mon Sep 17 00:00:00 2001 From: markt Date: Fri, 1 Apr 2011 01:02:07 +0000 Subject: [PATCH] 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 --- java/org/apache/catalina/startup/HostConfig.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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) { -- 2.11.0