remm 2003/06/15 00:41:56
Modified: catalina/src/share/org/apache/catalina/startup
HostConfig.java
Log:
- Better handling for webapps which have been undeployed through the
manager.
Revision Changes Path
1.13 +11 -7
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/HostConfig.java
Index: HostConfig.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/HostConfig.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- HostConfig.java 10 Jun 2003 20:15:35 -0000 1.12
+++ HostConfig.java 15 Jun 2003 07:41:56 -0000 1.13
@@ -706,10 +706,11 @@
if (files[i].endsWith(".war")) {
File dir = new File(appBase, files[i]);
Long lastModified = (Long) warLastModified.get(files[i]);
+ long dirLastModified = dir.lastModified();
if (lastModified == null) {
warLastModified.put
(files[i], new Long(dir.lastModified()));
- } else if (dir.lastModified() > lastModified.longValue()) {
+ } else if (dirLastModified > lastModified.longValue()) {
// The WAR has been modified: redeploy
String expandedDir = files[i];
int period = expandedDir.lastIndexOf(".");
@@ -719,10 +720,13 @@
String contextPath = "/" + expandedDir;
if (contextPath.equals("/ROOT"))
contextPath = "";
- if (dir.lastModified() > expanded.lastModified()) {
+ if (dirLastModified > expanded.lastModified()) {
try {
- ((Deployer) host).remove(contextPath, true);
deployed.remove(files[i]);
+ if (host.findChild(contextPath) != null) {
+ ((Deployer) host).remove(contextPath,
+ true);
+ }
} catch (Throwable t) {
log.error(sm.getString("hostConfig.undeployJar.error",
files[i]), t);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]