remm 2003/09/19 07:17:24 Modified: webapps/manager/WEB-INF/classes/org/apache/catalina/manager ManagerServlet.java Log: - Allow undeploying webapps when docBase isn't in the host appBase: their context file will be removed, but the docBase will not be removed. Revision Changes Path 1.10 +16 -15 jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/ManagerServlet.java Index: ManagerServlet.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/ManagerServlet.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- ManagerServlet.java 7 Sep 2003 18:47:14 -0000 1.9 +++ ManagerServlet.java 19 Sep 2003 14:17:24 -0000 1.10 @@ -1389,10 +1389,9 @@ docBaseDir = new File(appBaseDir, docBase); } String docBasePath = docBaseDir.getCanonicalPath(); + boolean deleteDir = true; if (!docBasePath.startsWith(deployedPath)) { - writer.println(sm.getString("managerServlet.noDocBase", - displayPath)); - return; + deleteDir = false; } // Remove this web application and its associated docBase @@ -1406,14 +1405,16 @@ } boolean dir = docBaseDir.isDirectory(); deployer.remove(path, true); - if (dir) { - undeployDir(docBaseDir); - // Delete the WAR file - File docBaseWar = new File(docBasePath + ".war"); - docBaseWar.delete(); - } else { - // Delete the WAR file - docBaseDir.delete(); + if (deleteDir) { + if (dir) { + undeployDir(docBaseDir); + // Delete the WAR file + File docBaseWar = new File(docBasePath + ".war"); + docBaseWar.delete(); + } else { + // Delete the WAR file + docBaseDir.delete(); + } } File docBaseXml = new File(context.getConfigFile()); docBaseXml.delete();
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]