You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by gi...@locus.apache.org on 2000/12/06 07:22:00 UTC

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

giacomo     00/12/05 22:21:59

  Modified:    src/org/apache/cocoon Tag: xml-cocoon2 Constants.java
               src/org/apache/cocoon/servlet Tag: xml-cocoon2
                        CocoonServlet.java
  Log:
  Patch to make Cocoon 2 easily deployable under Resin 1.2. Submitted by Rick Tessner.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.11  +2 -1      xml-cocoon/src/org/apache/cocoon/Attic/Constants.java
  
  Index: Constants.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Attic/Constants.java,v
  retrieving revision 1.1.2.10
  retrieving revision 1.1.2.11
  diff -u -r1.1.2.10 -r1.1.2.11
  --- Constants.java	2000/11/08 20:34:48	1.1.2.10
  +++ Constants.java	2000/12/06 06:21:55	1.1.2.11
  @@ -10,7 +10,7 @@
   
   /**
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.1.2.10 $ $Date: 2000/11/08 20:34:48 $
  + * @version CVS $Revision: 1.1.2.11 $ $Date: 2000/12/06 06:21:55 $
    */
   
   public interface Constants {
  @@ -54,6 +54,7 @@
       
       public static final String CATALINA_SERVLET_CLASSPATH = "org.apache.catalina.jsp_classpath";
       public static final String TOMCAT_SERVLET_CLASSPATH = "org.apache.tomcat.jsp_classpath";
  +    public static final String RESIN_SERVLET_CLASSPATH = "caucho.class.path";
   
       public final static String ERROR_NAMESPACE_URI = "http://apache.org/cocoon/" + CONF_VERSION + "/error";
       public final static String ERROR_NAMESPACE_PREFIX = "error";
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.4.34  +6 -3      xml-cocoon/src/org/apache/cocoon/servlet/Attic/CocoonServlet.java
  
  Index: CocoonServlet.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/servlet/Attic/CocoonServlet.java,v
  retrieving revision 1.1.4.33
  retrieving revision 1.1.4.34
  diff -u -r1.1.4.33 -r1.1.4.34
  --- CocoonServlet.java	2000/11/30 21:42:08	1.1.4.33
  +++ CocoonServlet.java	2000/12/06 06:21:56	1.1.4.34
  @@ -51,7 +51,7 @@
    *         (Apache Software Foundation, Exoffice Technologies)
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
    * @author <a href="mailto:nicolaken@supereva.it">Nicola Ken Barozzi</a> Aisa
  - * @version CVS $Revision: 1.1.4.33 $ $Date: 2000/11/30 21:42:08 $
  + * @version CVS $Revision: 1.1.4.34 $ $Date: 2000/12/06 06:21:56 $
    */
   
   public class CocoonServlet extends HttpServlet {
  @@ -83,7 +83,7 @@
               String path = this.context.getRealPath("/") +
                             "/WEB-INF/logs/cocoon.log";
   
  -            Category cocoonCategory = LogKit.createCategory("cocoon", Priority.DEBUG);
  +            Category cocoonCategory = LogKit.createCategory("cocoon", Priority.ERROR);
               log = LogKit.createLogger(cocoonCategory, new LogTarget[] {
                       new FileOutputLogTarget(path),
                       new ServletLogTarget(this.context, Priority.ERROR)
  @@ -92,7 +92,7 @@
               LogKit.log("Could not set up Cocoon Logger, will use screen instead", e);
           }
   
  -        LogKit.setGlobalPriority(Priority.DEBUG);
  +        LogKit.setGlobalPriority(Priority.ERROR);
   
           // WARNING (SM): the line below BREAKS the Servlet API portability of
           // web applications.
  @@ -115,6 +115,9 @@
           this.classpath = (String) context.getAttribute(Cocoon.CATALINA_SERVLET_CLASSPATH);
           if (this.classpath == null) {
               this.classpath = (String) context.getAttribute(Cocoon.TOMCAT_SERVLET_CLASSPATH);
  +        }
  +        if (this.classpath == null) {
  +            this.classpath = (String) context.getAttribute(Cocoon.RESIN_SERVLET_CLASSPATH);
           }
   
           this.workDir = ((File) this.context.getAttribute("javax.servlet.context.tempdir")).toString();
  
  
  

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

Posted by Berin Loritsch <bl...@infoplanning.com>.
I propose we apply the same approach to the ClassPath as we
did for forceloading classes.

We add another servlet param called "servlet-classpath" with
the name of the properties that contain the ClassPath.

Otherwise we will end up with 100 different entries that apply
to 100 different vendors.

----- Original Message ----- 
From: <gi...@locus.apache.org>
To: <xm...@apache.org>
Sent: Wednesday, December 06, 2000 1:22 AM
Subject: cvs commit: xml-cocoon/src/org/apache/cocoon/servlet CocoonServlet.java


> giacomo     00/12/05 22:21:59
> 
>   Modified:    src/org/apache/cocoon Tag: xml-cocoon2 Constants.java
>                src/org/apache/cocoon/servlet Tag: xml-cocoon2
>                         CocoonServlet.java
>   Log:
>   Patch to make Cocoon 2 easily deployable under Resin 1.2. Submitted by Rick Tessner.
>   
>   Revision  Changes    Path
>   No                   revision
>   
>   
>   No                   revision
>   
>   
>   1.1.2.11  +2 -1      xml-cocoon/src/org/apache/cocoon/Attic/Constants.java
>   
>   Index: Constants.java
>   ===================================================================
>   RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Attic/Constants.java,v
>   retrieving revision 1.1.2.10
>   retrieving revision 1.1.2.11
>   diff -u -r1.1.2.10 -r1.1.2.11
>   --- Constants.java 2000/11/08 20:34:48 1.1.2.10
>   +++ Constants.java 2000/12/06 06:21:55 1.1.2.11
>   @@ -10,7 +10,7 @@
>    
>    /**
>     * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
>   - * @version CVS $Revision: 1.1.2.10 $ $Date: 2000/11/08 20:34:48 $
>   + * @version CVS $Revision: 1.1.2.11 $ $Date: 2000/12/06 06:21:55 $
>     */
>    
>    public interface Constants {
>   @@ -54,6 +54,7 @@
>        
>        public static final String CATALINA_SERVLET_CLASSPATH = "org.apache.catalina.jsp_classpath";
>        public static final String TOMCAT_SERVLET_CLASSPATH = "org.apache.tomcat.jsp_classpath";
>   +    public static final String RESIN_SERVLET_CLASSPATH = "caucho.class.path";
>    
>        public final static String ERROR_NAMESPACE_URI = "http://apache.org/cocoon/" + CONF_VERSION + "/error";
>        public final static String ERROR_NAMESPACE_PREFIX = "error";
>   
>   
>   
>   No                   revision
>   
>   
>   No                   revision
>   
>   
>   1.1.4.34  +6 -3      xml-cocoon/src/org/apache/cocoon/servlet/Attic/CocoonServlet.java
>   
>   Index: CocoonServlet.java
>   ===================================================================
>   RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/servlet/Attic/CocoonServlet.java,v
>   retrieving revision 1.1.4.33
>   retrieving revision 1.1.4.34
>   diff -u -r1.1.4.33 -r1.1.4.34
>   --- CocoonServlet.java 2000/11/30 21:42:08 1.1.4.33
>   +++ CocoonServlet.java 2000/12/06 06:21:56 1.1.4.34
>   @@ -51,7 +51,7 @@
>     *         (Apache Software Foundation, Exoffice Technologies)
>     * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
>     * @author <a href="mailto:nicolaken@supereva.it">Nicola Ken Barozzi</a> Aisa
>   - * @version CVS $Revision: 1.1.4.33 $ $Date: 2000/11/30 21:42:08 $
>   + * @version CVS $Revision: 1.1.4.34 $ $Date: 2000/12/06 06:21:56 $
>     */
>    
>    public class CocoonServlet extends HttpServlet {
>   @@ -83,7 +83,7 @@
>                String path = this.context.getRealPath("/") +
>                              "/WEB-INF/logs/cocoon.log";
>    
>   -            Category cocoonCategory = LogKit.createCategory("cocoon", Priority.DEBUG);
>   +            Category cocoonCategory = LogKit.createCategory("cocoon", Priority.ERROR);
>                log = LogKit.createLogger(cocoonCategory, new LogTarget[] {
>                        new FileOutputLogTarget(path),
>                        new ServletLogTarget(this.context, Priority.ERROR)
>   @@ -92,7 +92,7 @@
>                LogKit.log("Could not set up Cocoon Logger, will use screen instead", e);
>            }
>    
>   -        LogKit.setGlobalPriority(Priority.DEBUG);
>   +        LogKit.setGlobalPriority(Priority.ERROR);
>    
>            // WARNING (SM): the line below BREAKS the Servlet API portability of
>            // web applications.
>   @@ -115,6 +115,9 @@
>            this.classpath = (String) context.getAttribute(Cocoon.CATALINA_SERVLET_CLASSPATH);
>            if (this.classpath == null) {
>                this.classpath = (String) context.getAttribute(Cocoon.TOMCAT_SERVLET_CLASSPATH);
>   +        }
>   +        if (this.classpath == null) {
>   +            this.classpath = (String) context.getAttribute(Cocoon.RESIN_SERVLET_CLASSPATH);
>            }
>    
>            this.workDir = ((File) this.context.getAttribute("javax.servlet.context.tempdir")).toString();
>   
>   
>   
> 
> ----------------------------------------------------------------------
> In case of troubles, e-mail:     webmaster@xml.apache.org
> To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


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

Posted by Berin Loritsch <bl...@infoplanning.com>.
----- Original Message ----- 
From: <gi...@locus.apache.org>
To: <xm...@apache.org>
Sent: Wednesday, December 06, 2000 1:22 AM
Subject: cvs commit: xml-cocoon/src/org/apache/cocoon/servlet CocoonServlet.java


> giacomo     00/12/05 22:21:59
>   -            Category cocoonCategory = LogKit.createCategory("cocoon", Priority.DEBUG);
>   +            Category cocoonCategory = LogKit.createCategory("cocoon", Priority.ERROR);

This is why I want to set up a way to configure the LogKit
outside of the CocoonServlet Object.  My believe is that while
we are working on Cocoon (before any release) we should have
as much logging as helps.  I realize the constraints on the
Logging in real world applications.  The CocoonServlet Logger
has two targets: A file in WEB-INF/logs (because it is the only
place that we are allowed on all platforms), and the Context.log
destination.  The Context.log destination is at Priority.ERROR
to keep from overloading the inneficient logging mechanism
there.  But the file is set to Priority.DEBUG to get useful
information.  I am still trying to locate the source of the
error with WebSphere and generated binary streams.

I have gotten to the point where I know that Cocoon is doing
the work involved with the URIs, but something is happening
where WebSphere is closing the stream and issuing a "500 ok"
error (I know, it does not make sense).

The next place to look is if there is a method that needs
to be called to keep the stream open on this platform (like
a stream type).