tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@locus.apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup ContextConfig.java
Date Fri, 01 Dec 2000 19:25:33 GMT
craigmcc    00/12/01 11:25:32

  Modified:    catalina/src/share/org/apache/catalina/startup
                        ContextConfig.java
  Log:
  Correctly handle a <distributable/> element in the web application deployment
  descriptor.  Previously, this caused a "cannot find a setDistributable method"
  exception.
  
  PR: BugRat Bug Report #509
  Submitted by: Guillermo Ferri Pastor <guy@cesat.es>
  
  Revision  Changes    Path
  1.34      +28 -5     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
  
  Index: ContextConfig.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- ContextConfig.java	2000/11/24 22:36:24	1.33
  +++ ContextConfig.java	2000/12/01 19:25:31	1.34
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
1.33 2000/11/24 22:36:24 craigmcc Exp $
  - * $Revision: 1.33 $
  - * $Date: 2000/11/24 22:36:24 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
1.34 2000/12/01 19:25:31 craigmcc Exp $
  + * $Revision: 1.34 $
  + * $Date: 2000/12/01 19:25:31 $
    *
    * ====================================================================
    *
  @@ -118,7 +118,7 @@
    * of that Context, and the associated defined servlets.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.33 $ $Date: 2000/11/24 22:36:24 $
  + * @version $Revision: 1.34 $ $Date: 2000/12/01 19:25:31 $
    */
   
   public final class ContextConfig
  @@ -447,7 +447,7 @@
                          mapper.methodSetter("setDisplayName", 0));
   
   	mapper.addRule("web-app/distributable",
  -		       mapper.methodSetter("setDistributable", 0));
  +                       new SetDistributableAction());
   
   	mapper.addRule("web-app/ejb-ref",
   		 mapper.objectCreate("org.apache.catalina.deploy.ContextEjb"));
  @@ -1112,6 +1112,29 @@
           securityConstraint.setAuthConstraint(true);
   	if (ctx.getDebug() > 0)
   	    ctx.log("Calling SecurityConstraint.setAuthConstraint(true)");
  +    }
  +
  +}
  +
  +
  +/**
  + * Class that calls <code>setDistributable(true)</code> for the top object
  + * on the stack, which must be a <code>org.apache.catalina.Context</code>.
  + */
  +
  +final class SetDistributableAction extends XmlAction {
  +
  +    public SetDistributableAction() {
  +        super();
  +    }
  +
  +    public void start(SaxContext ctx) throws Exception {
  +        Stack stack = ctx.getObjectStack();
  +        Context context = (Context) stack.peek();
  +        context.setDistributable(true);
  +        if (ctx.getDebug() > 0)
  +            ctx.log(context.getClass().getName() +
  +                    ".setDistributable( true)");
       }
   
   }
  
  
  

Mime
View raw message