You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by st...@locus.apache.org on 2000/01/03 02:39:42 UTC
cvs commit: xml-cocoon/src/org/apache/cocoon Cocoon.java cocoon.properties Defaults.java Engine.java
stefano 00/01/02 17:39:42
Modified: src/org/apache/cocoon Cocoon.java cocoon.properties
Defaults.java Engine.java
Log:
- added URL factory behavior
- added XSP properties
Revision Changes Path
1.9 +4 -4 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.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Cocoon.java 1999/12/23 01:28:58 1.8
+++ Cocoon.java 2000/01/03 01:39:41 1.9
@@ -1,4 +1,4 @@
-/*-- $Id: Cocoon.java,v 1.8 1999/12/23 01:28:58 stefano Exp $ --
+/*-- $Id: Cocoon.java,v 1.9 2000/01/03 01:39:41 stefano Exp $ --
============================================================================
The Apache Software License, Version 1.1
@@ -64,7 +64,7 @@
* separate different knowledge contexts in different processing layers.
*
* @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
- * @version $Revision: 1.8 $ $Date: 1999/12/23 01:28:58 $
+ * @version $Revision: 1.9 $ $Date: 2000/01/03 01:39:41 $
*/
public class Cocoon extends HttpServlet implements Defaults {
@@ -149,9 +149,9 @@
} else {
response.sendError(404);
}
- } catch (Exception e) {
+ } catch (Throwable t) {
if (errorsInternally) {
- Frontend.error(response, "Error found handling the request.", e);
+ Frontend.error(response, "Error found handling the request.", t);
} else {
response.sendError(500);
}
1.7 +27 -0 xml-cocoon/src/org/apache/cocoon/cocoon.properties
Index: cocoon.properties
===================================================================
RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/cocoon.properties,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- cocoon.properties 1999/12/16 01:12:41 1.6
+++ cocoon.properties 2000/01/03 01:39:41 1.7
@@ -8,6 +8,17 @@
# Global Configurations #
##########################################
+# Indicates the Cocoon document root.
+#
+# To use this "mounting" capability, you should use the "cocoon://path/file.ext"
+# syntax instead of "file:///path/file.ext" syntax. If the cocoon protocol
+# is found, this is evaluated using the absolute path indicated here, placed
+# in front of the indicated path. For example, if document.root=/home/cocoon:
+# cocoon://hello.xml ---> file:///home/cocoon/hello.xml
+# which is very helpful if your web-app needs to be "remounted".
+# NOTE: if unset, the "user.home" property of the JVM is used.
+# document.root = /home/httpd/cocoon/
+
# Indicates whether or not Cocoon should be visible if
# the requested URI equals the specified one.
selfservlet.enabled = true
@@ -97,7 +108,22 @@
# SQL Processor
processor.type.sql = org.apache.cocoon.processor.sql.SQLProcessor
+# eXtensible Server Pages Processor (XSP)
+processor.type.xsp = org.apache.cocoon.processor.xsp.XSPProcessor
+# Set the repository where the generated XSP pages are stored
+# NOTE: make sure the directory is readable. This directory is usually
+# relative to the web server's or to the servlet engine's. In case you're not
+# sure, make it absolute but be careful not to make this open to everyone.
+processor.xsp.repository = ./repository
+
+# Set the libraries associated with the given namespace.
+# Use the syntax:
+# processor.xsp.library.<namespace-tag>.<language> = URL to file
+# where "URL to file" is usually starting with file:/// if you locate
+# your custom library in your file system.
+processor.xsp.library.util.java = resource://org/apache/cocoon/processor/xsp/util-java.xsl
+processor.xsp.library.servlet.java = resource://org/apache/cocoon/example/servlet-java.xsl
##########################################
@@ -113,6 +139,7 @@
formatter.type.text/html = org.apache.cocoon.formatter.HTMLFormatter
formatter.type.text/plain = org.apache.cocoon.formatter.TextFormatter
formatter.type.text/xslfo = org.apache.cocoon.formatter.FO2PDFFormatter
+formatter.type.model/vrml = org.apache.cocoon.formatter.VRMLFormatter
# This is used when no <?cocoon?> PI is present to indicate
# which MIME type to associate to the document.
1.8 +3 -2 xml-cocoon/src/org/apache/cocoon/Defaults.java
Index: Defaults.java
===================================================================
RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Defaults.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Defaults.java 1999/12/14 23:46:14 1.7
+++ Defaults.java 2000/01/03 01:39:42 1.8
@@ -1,4 +1,4 @@
-/*-- $Id: Defaults.java,v 1.7 1999/12/14 23:46:14 stefano Exp $ --
+/*-- $Id: Defaults.java,v 1.8 2000/01/03 01:39:42 stefano Exp $ --
============================================================================
The Apache Software License, Version 1.1
@@ -54,7 +54,7 @@
* The Cocoon strings.
*
* @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
- * @version $Revision: 1.7 $ $Date: 1999/12/14 23:46:14 $
+ * @version $Revision: 1.8 $ $Date: 2000/01/03 01:39:42 $
*/
public interface Defaults {
@@ -67,6 +67,7 @@
public static final String PROPERTIES = "cocoon.properties";
public static final String INTERNAL_PROPERTIES = "org/apache/cocoon/" + PROPERTIES;
+ public static final String HOME = "document.root";
public static final String SHOW_STATUS = "selfservlet.enabled";
public static final String STATUS_URL = "selfservlet.uri";
public static final String STATUS_URL_DEFAULT = "/Cocoon.xml";
1.8 +7 -2 xml-cocoon/src/org/apache/cocoon/Engine.java
Index: Engine.java
===================================================================
RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Engine.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Engine.java 1999/12/23 01:28:58 1.7
+++ Engine.java 2000/01/03 01:39:42 1.8
@@ -1,4 +1,4 @@
-/*-- $Id: Engine.java,v 1.7 1999/12/23 01:28:58 stefano Exp $ --
+/*-- $Id: Engine.java,v 1.8 2000/01/03 01:39:42 stefano Exp $ --
============================================================================
The Apache Software License, Version 1.1
@@ -72,7 +72,7 @@
* This class implements the engine that does all the document processing.
*
* @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
- * @version $Revision: 1.7 $ $Date: 1999/12/23 01:28:58 $
+ * @version $Revision: 1.8 $ $Date: 2000/01/03 01:39:42 $
*/
public class Engine implements Defaults {
@@ -110,6 +110,11 @@
// stores the configuration instance
this.configurations = configurations;
+
+ // Create the URLHandler factory and register it
+ URL.setURLStreamHandlerFactory(
+ new URLHandlerFactory((String) configurations.get(HOME))
+ );
// stores the engine context
if ((context != null) && (context instanceof ServletContext)) {