You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2003/07/09 20:16:33 UTC

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup SetDocBaseRule.java

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


Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup SetDocBaseRule.java

Posted by Tim Funk <fu...@joedog.org>.
Torstenwithout ??

copy paste oops?


 >   - *    nor may "Apache" appear in their names without prior written
 >   + *    nor may "Apache" appear in their names Torstenwithout prior written


-Tim



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org