greenrd     00/12/22 03:51:10

  Modified:    src/org/apache/cocoon Utils.java
               src/org/apache/cocoon/framework Page.java
               src/org/apache/cocoon/processor/xslt XSLTProcessor.java
               src/org/apache/cocoon/processor/xsp XSPProcessor.java
  Log:
  command line fixes
  
  Revision  Changes    Path
  1.21      +6 -4      xml-cocoon/src/org/apache/cocoon/Utils.java
  
  Index: Utils.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Utils.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- Utils.java        2000/11/21 23:38:24     1.20
  +++ Utils.java        2000/12/22 11:51:08     1.21
  @@ -1,4 +1,4 @@
  -/*-- $Id: Utils.java,v 1.20 2000/11/21 23:38:24 greenrd Exp $ --
  +/*-- $Id: Utils.java,v 1.21 2000/12/22 11:51:08 greenrd Exp $ --
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -66,7 +66,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Robin Green</a>
  - * @version $Revision: 1.20 $ $Date: 2000/11/21 23:38:24 $
  + * @version $Revision: 1.21 $ $Date: 2000/12/22 11:51:08 $
    */
   
   public final class Utils {
  @@ -226,13 +226,15 @@
               url.append(req.getQueryString());
           }
   
  -        url.append("&headers:");
           Enumeration headers = req.getHeaderNames();
  -        while (headers.hasMoreElements()) {
  +        if (headers != null) {
  +          url.append("&headers:");
  +          while (headers.hasMoreElements()) {
               String name = (String)headers.nextElement();
               url.append(name);
               url.append("=");
               url.append((String)req.getHeader(name));
  +          }
           }
           return url.toString();
       }
  
  
  
  1.6       +5 -4      xml-cocoon/src/org/apache/cocoon/framework/Page.java
  
  Index: Page.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/framework/Page.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Page.java 2000/11/20 01:43:54     1.5
  +++ Page.java 2000/12/22 11:51:08     1.6
  @@ -1,4 +1,4 @@
  -/*-- $Id: Page.java,v 1.5 2000/11/20 01:43:54 greenrd Exp $ -- 
  +/*-- $Id: Page.java,v 1.6 2000/12/22 11:51:08 greenrd Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -58,7 +58,7 @@
    * The Page wrapper class.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a>
  - * @version $Revision: 1.5 $ $Date: 2000/11/20 01:43:54 $
  + * @version $Revision: 1.6 $ $Date: 2000/12/22 11:51:08 $
    */
   
   public class Page implements java.io.Serializable, Changeable, Cacheable {
  @@ -120,8 +120,9 @@
           // Surprisingly, according to HTTP 1.1 spec, POST is
           // not one of them!
           String method = request.getMethod ();
  -        if (method.equals ("OPTIONS") || method.equals ("PUT") ||
  -            method.equals ("DELETE") || method.equals ("TRACE"))
  +        if (method != null
  +            && (method.equals ("OPTIONS") || method.equals ("PUT") ||
  +                method.equals ("DELETE") || method.equals ("TRACE")))
               return false;
   
           Enumeration e = getChangeables();
  
  
  
  1.25      +6 -4      
xml-cocoon/src/org/apache/cocoon/processor/xslt/XSLTProcessor.java
  
  Index: XSLTProcessor.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon/src/org/apache/cocoon/processor/xslt/XSLTProcessor.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- XSLTProcessor.java        2000/12/01 23:36:44     1.24
  +++ XSLTProcessor.java        2000/12/22 11:51:09     1.25
  @@ -1,4 +1,4 @@
  -/*-- $Id: XSLTProcessor.java,v 1.24 2000/12/01 23:36:44 greenrd Exp $ --
  +/*-- $Id: XSLTProcessor.java,v 1.25 2000/12/22 11:51:09 greenrd Exp $ --
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -75,7 +75,7 @@
    * This class implements an XSLT processor.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a>
  - * @version $Revision: 1.24 $ $Date: 2000/12/01 23:36:44 $
  + * @version $Revision: 1.25 $ $Date: 2000/12/22 11:51:09 $
    */
   
   public class XSLTProcessor implements Actor, Processor, Status, Defaults, 
Cacheable {
  @@ -143,10 +143,12 @@
           }
           
           Enumeration headers = request.getHeaderNames ();
  -        while (headers.hasMoreElements ()) {
  +        if (headers != null) {
  +          while (headers.hasMoreElements ()) {
               String name = (String) headers.nextElement ();
               if (isValidName (name))
  -                params.put ("R_" + name, request.getHeader (name));
  +              params.put ("R_" + name, request.getHeader (name));
  +          }
           }
   
           return params;
  
  
  
  1.35      +3 -3      
xml-cocoon/src/org/apache/cocoon/processor/xsp/XSPProcessor.java
  
  Index: XSPProcessor.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon/src/org/apache/cocoon/processor/xsp/XSPProcessor.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- XSPProcessor.java 2000/12/13 15:27:52     1.34
  +++ XSPProcessor.java 2000/12/22 11:51:09     1.35
  @@ -1,4 +1,4 @@
  -/*-- $Id: XSPProcessor.java,v 1.34 2000/12/13 15:27:52 greenrd Exp $ --
  +/*-- $Id: XSPProcessor.java,v 1.35 2000/12/22 11:51:09 greenrd Exp $ --
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -78,7 +78,7 @@
    * This class implements the XSP engine.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Ricardo Rocha</a>
  - * @version $Revision: 1.34 $ $Date: 2000/12/13 15:27:52 $
  + * @version $Revision: 1.35 $ $Date: 2000/12/22 11:51:09 $
    */
   public class XSPProcessor extends AbstractActor
     implements Processor, Configurable, Status, Cacheable
  @@ -215,7 +215,7 @@
       // Try to get the classpath from conf or Catalina or Tomcat or Resin 
first;
       // if that all fails, use the standard one.
       String classpath = (String) conf.get ("localclasspath");
  -    if (classpath == null) {
  +    if (classpath == null && this.servletContext != null) {
         classpath = (String)
           
this.servletContext.getAttribute("org.apache.catalina.jsp_classpath");
         if (classpath == null) {
  
  
  

Reply via email to