Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 82211 invoked from network); 30 Apr 2003 15:26:21 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 30 Apr 2003 15:26:21 -0000 Received: (qmail 725 invoked by uid 97); 30 Apr 2003 15:28:22 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@nagoya.betaversion.org Received: (qmail 718 invoked from network); 30 Apr 2003 15:28:22 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 30 Apr 2003 15:28:22 -0000 Received: (qmail 71726 invoked by uid 500); 30 Apr 2003 15:23:55 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 71670 invoked from network); 30 Apr 2003 15:23:54 -0000 Received: from main.gmane.org (80.91.224.249) by daedalus.apache.org with SMTP; 30 Apr 2003 15:23:54 -0000 Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19AtOL-000764-00 for ; Wed, 30 Apr 2003 17:21:05 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: tomcat-dev@jakarta.apache.org Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19AmGY-0000PS-00 for ; Wed, 30 Apr 2003 09:44:34 +0200 From: "Sean Dockery" Subject: manager undeploy task failing with "cannot remove document root" Date: Wed, 30 Apr 2003 01:44:51 -0600 Lines: 35 Message-ID: X-Complaints-To: usenet@main.gmane.org X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Sender: news X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I've been having a problem with the undeploy task failing. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12643 I traced the problem down into the undeploy method of the ManagerServlet class in the org.apache.catalina.servlets package. The message is thrown back because the absolute docBase is determined to be invalid by the following (excerpt) of code (approx. line 1206-1218): // Validate the docBase path of this application String deployedPath = deployed.getCanonicalPath(); String docBase = context.getDocBase(); File docBaseDir = new File(docBase); if (!docBaseDir.isAbsolute()) { docBaseDir = new File(appBaseDir, docBase); } String docBasePath = docBaseDir.getCanonicalPath(); if (!docBasePath.startsWith(deployedPath)) { writer.println(sm.getString("managerServlet.noDocBase", displayPath)); return; } Can someone walk me through the semantics of this code segment? Does the docBase end up being $TOMCAT_HOME/work/.../.../mycontext or $TOMCAT_HOME/webapps/mycontext? I see in the init method that the member variable deployed is initialized to (what I believe to be) the value of $TOMCAT_HOME/work. If that is the case, then won't the startsWith test always fail as $TOMCAT_HOME/webapps/mycontext will never start with $TOMCAT_HOME/work? What have I assumed incorrectly? --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org