Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 58653 invoked from network); 9 Jul 2003 18:16:42 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 9 Jul 2003 18:16:42 -0000 Received: (qmail 29316 invoked by uid 97); 9 Jul 2003 18:19:12 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@nagoya.betaversion.org Received: (qmail 29309 invoked from network); 9 Jul 2003 18:19:12 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 9 Jul 2003 18:19:12 -0000 Received: (qmail 57866 invoked by uid 500); 9 Jul 2003 18:16:34 -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 57813 invoked by uid 500); 9 Jul 2003 18:16:34 -0000 Received: (qmail 57805 invoked from network); 9 Jul 2003 18:16:33 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 9 Jul 2003 18:16:33 -0000 Received: (qmail 99029 invoked by uid 1135); 9 Jul 2003 18:16:33 -0000 Date: 9 Jul 2003 18:16:33 -0000 Message-ID: <20030709181633.99028.qmail@icarus.apache.org> From: remm@apache.org To: jakarta-tomcat-catalina-cvs@apache.org Subject: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup SetDocBaseRule.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N remm 2003/07/09 11:16:33 Modified: catalina/src/share/org/apache/catalina/startup SetDocBaseRule.java Log: - Fix bug 21419: failure to start when a Context element is included in server.xml. - Patch submitted by Torsten Fohrer. Revision Changes Path 1.2 +11 -6 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/SetDocBaseRule.java Index: SetDocBaseRule.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/SetDocBaseRule.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- SetDocBaseRule.java 24 Jun 2003 22:37:05 -0000 1.1 +++ SetDocBaseRule.java 9 Jul 2003 18:16:32 -0000 1.2 @@ -35,7 +35,7 @@ * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written + * nor may "Apache" appear in their names Torstenwithout prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED @@ -118,8 +118,13 @@ Context child = (Context) digester.peek(0); Deployer parent = (Deployer) digester.peek(1); - Method method = parent.getClass().getMethod("getHost", null); - Host host = (Host) method.invoke(parent, null); + Host host = null; + if (!(parent instanceof StandardHost)) { + Method method = parent.getClass().getMethod("getHost", null); + host = (Host) method.invoke(parent, null); + } else { + host = (Host) parent; + } String appBase = host.getAppBase(); if (!(host instanceof StandardHost)) { --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org