You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by gr...@locus.apache.org on 2000/12/12 17:08:05 UTC

cvs commit: xml-cocoon/src/org/apache/cocoon Cocoon.java

greenrd     00/12/12 08:08:04

  Modified:    .        changes.xml
               src/org/apache/cocoon Cocoon.java
  Log:
  workaround for websphere classloader: URL handler bug
  
  Revision  Changes    Path
  1.164     +5 -1      xml-cocoon/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/changes.xml,v
  retrieving revision 1.163
  retrieving revision 1.164
  diff -u -r1.163 -r1.164
  --- changes.xml	2000/12/11 11:33:19	1.163
  +++ changes.xml	2000/12/12 16:07:59	1.164
  @@ -4,7 +4,7 @@
   
   <!--
     History of Cocoon changes   
  -  $Id: changes.xml,v 1.163 2000/12/11 11:33:19 greenrd Exp $ 
  +  $Id: changes.xml,v 1.164 2000/12/12 16:07:59 greenrd Exp $ 
   -->
   
   <changes title="History of Changes">
  @@ -18,6 +18,10 @@
     </devs>
   
    <release version="@version@" date="@date@">
  +  <action dev="RDG" type="fix" due-to="Berin Loritsch" 
  +   due-to-email="bloritsch@infoplanning.com">
  +   Workaround for Websphere classloader: URL handler bug
  +  </action>
     <action dev="RDG" type="add">
      Added encoding support to util:get-file-contents and various similar
      XSPUtil methods
  
  
  
  1.18      +10 -2     xml-cocoon/src/org/apache/cocoon/Cocoon.java
  
  Index: Cocoon.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Cocoon.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- Cocoon.java	2000/11/16 17:31:53	1.17
  +++ Cocoon.java	2000/12/12 16:08:02	1.18
  @@ -1,4 +1,4 @@
  -/*-- $Id: Cocoon.java,v 1.17 2000/11/16 17:31:53 greenrd Exp $ -- 
  +/*-- $Id: Cocoon.java,v 1.18 2000/12/12 16:08:02 greenrd Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -64,10 +64,18 @@
    * separate different knowledge contexts in different processing layers.
    *
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version $Revision: 1.17 $ $Date: 2000/11/16 17:31:53 $
  + * @version $Revision: 1.18 $ $Date: 2000/12/12 16:08:02 $
    */
   
   public class Cocoon extends HttpServlet implements Defaults {
  +
  +    // Quick workaround for Websphere bug
  +    static {
  +      try {
  +        Class.forName ("com.ibm.servlet.classloader.Handler");
  +      }
  +      catch (Throwable t) {} // ignore
  +    }
   
       Engine engine = null;
       String message = null;
  
  
  

Re: cvs commit: xml-cocoon/src/org/apache/cocoon Cocoon.java

Posted by Berin Loritsch <bl...@infoplanning.com>.
----- Original Message ----- 
From: "Berin Loritsch" <bl...@infoplanning.com>
To: <co...@xml.apache.org>
Sent: Tuesday, December 12, 2000 11:12 AM
Subject: Re: cvs commit: xml-cocoon/src/org/apache/cocoon Cocoon.java


> ----- Original Message ----- 
> From: <gr...@locus.apache.org>
> To: <xm...@apache.org>
> Sent: Tuesday, December 12, 2000 11:08 AM
> Subject: cvs commit: xml-cocoon/src/org/apache/cocoon Cocoon.java
> 
> 
> > greenrd     00/12/12 08:08:04
> > 
> >    public class Cocoon extends HttpServlet implements Defaults {
> >   +
> >   +    // Quick workaround for Websphere bug
> >   +    static {
> >   +      try {
> >   +        Class.forName ("com.ibm.servlet.classloader.Handler");
> >   +      }
> >   +      catch (Throwable t) {} // ignore
> >   +    }
> >    
> >        Engine engine = null;
> >        String message = null;
> >   
> 
> This was so unnecessary and unscalable.  We have the attribute
> force-load for this express purpose.  All we have to do is add
> the proper attribute to the servlet init parameters and all is
> well with the world!  That is why I committed that change for
> parsing the "force-load" parameter!
> 
> And as a general course of action: NEVER completely ignore an
> exception--log it at the very least!

I just noticed, that this is for Cocoon 1.  See if you can back-port
the force-load parameter handling from Cocoon 2.  That way, if we
have problems with other servlet engines, we don't have to change
the code.

The exception should count.  If the parameter force-load is encountered,
and Cocoon can't load the class, then we should throw a ServletException
and abort.  If the parameter is not encountered, then it should not
be processed.


Re: cvs commit: xml-cocoon/src/org/apache/cocoon Cocoon.java

Posted by Berin Loritsch <bl...@infoplanning.com>.
----- Original Message ----- 
From: <gr...@locus.apache.org>
To: <xm...@apache.org>
Sent: Tuesday, December 12, 2000 11:08 AM
Subject: cvs commit: xml-cocoon/src/org/apache/cocoon Cocoon.java


> greenrd     00/12/12 08:08:04
> 
>    public class Cocoon extends HttpServlet implements Defaults {
>   +
>   +    // Quick workaround for Websphere bug
>   +    static {
>   +      try {
>   +        Class.forName ("com.ibm.servlet.classloader.Handler");
>   +      }
>   +      catch (Throwable t) {} // ignore
>   +    }
>    
>        Engine engine = null;
>        String message = null;
>   

This was so unnecessary and unscalable.  We have the attribute
force-load for this express purpose.  All we have to do is add
the proper attribute to the servlet init parameters and all is
well with the world!  That is why I committed that change for
parsing the "force-load" parameter!

And as a general course of action: NEVER completely ignore an
exception--log it at the very least!