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 [EMAIL PROTECTED] * * 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]