Author: cziegeler
Date: Mon Feb  7 07:38:28 2005
New Revision: 151721

URL: http://svn.apache.org/viewcvs?view=rev&rev=151721
Log:
Use cocoon gateway object in forms transformer
Enhance proxy transformer
Improved settings
Reset exception if xconf is wrong

Modified:
    
cocoon/trunk/src/blocks/forms/java/org/apache/cocoon/forms/transformation/FormsPipelineConfig.java
    cocoon/trunk/src/blocks/forms/samples/dreamteam/content/teamTemplate.jx
    cocoon/trunk/src/blocks/forms/samples/forms/datasource_chooser_template.xml
    cocoon/trunk/src/blocks/forms/samples/forms/dynamicrepeater_template.xml
    cocoon/trunk/src/blocks/forms/samples/forms/form1_template.xml
    cocoon/trunk/src/blocks/forms/samples/forms/form2_template.xml
    cocoon/trunk/src/blocks/forms/samples/forms/form_model_gui_template.xml
    cocoon/trunk/src/blocks/forms/samples/forms/htmlarea_template.xml
    cocoon/trunk/src/blocks/forms/samples/forms/multipage_template.xml
    cocoon/trunk/src/blocks/forms/samples/forms/registration_template.xml
    cocoon/trunk/src/blocks/forms/samples/forms/tasktree_template.xml
    cocoon/trunk/src/blocks/forms/samples/forms/upload_template.xml
    cocoon/trunk/src/blocks/forms/samples/forms/xdoceditor_template.xml
    
cocoon/trunk/src/blocks/forms/samples/swan/data/form_model_gui_template_data.xml
    cocoon/trunk/src/blocks/forms/samples/swan/data/sample_form_1_template.xml
    cocoon/trunk/src/blocks/forms/samples/swan/data/sample_form_2_template.xml
    cocoon/trunk/src/blocks/forms/samples/swan/forms/binding_template.xml
    cocoon/trunk/src/blocks/forms/samples/swan/forms/model_template.xml
    cocoon/trunk/src/blocks/forms/samples/swan/forms/sitemap_template.xml
    cocoon/trunk/src/blocks/forms/samples/swan/forms/template_template.xml
    cocoon/trunk/src/blocks/forms/samples/swan/forms/xreport_template.xml
    
cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/copletManagement/LayoutActions.java
    
cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/copletManagement/generation/XMLProfileGenerator.java
    
cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/transformation/ProxyTransformer.java
    
cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portlet/CocoonPortlet.java
    cocoon/trunk/src/core/java/org/apache/cocoon/configuration/Settings.java
    
cocoon/trunk/src/core/java/org/apache/cocoon/core/container/handler/NonThreadSafePoolableComponentHandler.java
    
cocoon/trunk/src/core/java/org/apache/cocoon/core/source/SimpleSourceResolver.java
    cocoon/trunk/src/documentation/xdocs/userdocs/forms/templatetransformer.xml
    cocoon/trunk/src/java/org/apache/cocoon/Cocoon.java
    cocoon/trunk/src/java/org/apache/cocoon/bean/CocoonWrapper.java
    cocoon/trunk/src/java/org/apache/cocoon/components/ContextHelper.java
    
cocoon/trunk/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java
    
cocoon/trunk/src/java/org/apache/cocoon/environment/internal/EnvironmentHelper.java
    cocoon/trunk/src/java/org/apache/cocoon/servlet/CocoonServlet.java
    cocoon/trunk/status.xml

Modified: 
cocoon/trunk/src/blocks/forms/java/org/apache/cocoon/forms/transformation/FormsPipelineConfig.java
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/java/org/apache/cocoon/forms/transformation/FormsPipelineConfig.java?view=diff&r1=151720&r2=151721
==============================================================================
--- 
cocoon/trunk/src/blocks/forms/java/org/apache/cocoon/forms/transformation/FormsPipelineConfig.java
 (original)
+++ 
cocoon/trunk/src/blocks/forms/java/org/apache/cocoon/forms/transformation/FormsPipelineConfig.java
 Mon Feb  7 07:38:28 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
 
 import java.io.IOException;
 import java.io.StringReader;
+import java.util.HashMap;
 import java.util.Locale;
 import java.util.Map;
 
@@ -99,11 +100,25 @@
         Object flowContext = FlowHelper.getContextObject(objectModel);
         WebContinuation wk = FlowHelper.getWebContinuation(objectModel);
         JXPathContext jxpc = JXPathContext.newContext(flowContext);
+        // We manually create a cocoon object here to provide the same way
+        // of accessing things as in the jxtg
+        // as soon as we have our unified om, we should use that
+        Request request = ObjectModelHelper.getRequest(objectModel);
+        Session session = request.getSession(false);
+        final Map cocoonOM = new HashMap();
+        cocoonOM.put("continuation", wk);
+        cocoonOM.put("request", request);
+        if ( session != null ) {
+            cocoonOM.put("session", session);
+        }
+        cocoonOM.put("parameters", parameters);
+        
         Variables vars = jxpc.getVariables();
+        vars.declareVariable("cocoon", cocoonOM);
+        // These four are deprecated!
+        // FIXME - We should add a warning if they are used
         vars.declareVariable("continuation", wk);
-        Request request = ObjectModelHelper.getRequest(objectModel);
         vars.declareVariable("request", request);
-        Session session = request.getSession(false);
         vars.declareVariable("session", session);
         vars.declareVariable("parameters", parameters);
         

Modified: 
cocoon/trunk/src/blocks/forms/samples/dreamteam/content/teamTemplate.jx
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/samples/dreamteam/content/teamTemplate.jx?view=diff&r1=151720&r2=151721
==============================================================================
--- cocoon/trunk/src/blocks/forms/samples/dreamteam/content/teamTemplate.jx 
(original)
+++ cocoon/trunk/src/blocks/forms/samples/dreamteam/content/teamTemplate.jx Mon 
Feb  7 07:38:28 2005
@@ -55,7 +55,7 @@
           </tr>
         </table>
       </div>
-      <ft:form-template action="#{$continuation/id}.continue" method="POST">
+      <ft:form-template action="#{$cocoon/continuation/id}.continue" 
method="POST">
         <jx:choose>
           <jx:when test="${form.getChild('teammembers').getSize() == 0}">
             <p>

Modified: 
cocoon/trunk/src/blocks/forms/samples/forms/datasource_chooser_template.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/samples/forms/datasource_chooser_template.xml?view=diff&r1=151720&r2=151721
==============================================================================
--- cocoon/trunk/src/blocks/forms/samples/forms/datasource_chooser_template.xml 
(original)
+++ cocoon/trunk/src/blocks/forms/samples/forms/datasource_chooser_template.xml 
Mon Feb  7 07:38:28 2005
@@ -23,7 +23,7 @@
   
   <title>Datasource chooser</title>
   <content>
-    <ft:form-template action="#{$continuation/id}.continue" method="POST">
+    <ft:form-template action="#{$cocoon/continuation/id}.continue" 
method="POST">
       
       <p>Datasource name: <ft:widget id="name"/></p>
       <fieldset>

Modified: 
cocoon/trunk/src/blocks/forms/samples/forms/dynamicrepeater_template.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/samples/forms/dynamicrepeater_template.xml?view=diff&r1=151720&r2=151721
==============================================================================
--- cocoon/trunk/src/blocks/forms/samples/forms/dynamicrepeater_template.xml 
(original)
+++ cocoon/trunk/src/blocks/forms/samples/forms/dynamicrepeater_template.xml 
Mon Feb  7 07:38:28 2005
@@ -38,7 +38,7 @@
   </style>
   
   <content>
-    <ft:form-template action="#{$continuation/id}.continue" method="POST">
+    <ft:form-template action="#{$cocoon/continuation/id}.continue" 
method="POST">
     
     <p>This is an example of how dynamic templates (using the JX macros) allow 
to change the
        page structure depending on the form contents. By adding or removing 
rows in the repeater

Modified: cocoon/trunk/src/blocks/forms/samples/forms/form1_template.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/samples/forms/form1_template.xml?view=diff&r1=151720&r2=151721
==============================================================================
--- cocoon/trunk/src/blocks/forms/samples/forms/form1_template.xml (original)
+++ cocoon/trunk/src/blocks/forms/samples/forms/form1_template.xml Mon Feb  7 
07:38:28 2005
@@ -26,7 +26,7 @@
   
   <title>Sample form</title>
   <content>
-    <ft:form-template action="#{$continuation/id}.continue" method="POST">
+    <ft:form-template action="#{$cocoon/continuation/id}.continue" 
method="POST">
       <div style="width: 90%; margin: 10px 50px 50px 50px;">
         <!-- group with tabs. Each of the children of <items> will constitute 
a tab -->
         <fi:group>

Modified: cocoon/trunk/src/blocks/forms/samples/forms/form2_template.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/samples/forms/form2_template.xml?view=diff&r1=151720&r2=151721
==============================================================================
--- cocoon/trunk/src/blocks/forms/samples/forms/form2_template.xml (original)
+++ cocoon/trunk/src/blocks/forms/samples/forms/form2_template.xml Mon Feb  7 
07:38:28 2005
@@ -36,7 +36,7 @@
     <p>If you're running the bean-binding demo, then after successful submit
       you'll be shown a page that uses the JXTemplateGenerator to extract
       data from the bean (to show that the bean really has been updated).</p>
-    <ft:form-template action="#{$continuation/id}.continue" method="POST">
+    <ft:form-template action="#{$cocoon/continuation/id}.continue" 
method="POST">
       <table border="1">
         <tr>
           <td valign="top"><ft:widget-label id="email"/></td>

Modified: 
cocoon/trunk/src/blocks/forms/samples/forms/form_model_gui_template.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/samples/forms/form_model_gui_template.xml?view=diff&r1=151720&r2=151721
==============================================================================
--- cocoon/trunk/src/blocks/forms/samples/forms/form_model_gui_template.xml 
(original)
+++ cocoon/trunk/src/blocks/forms/samples/forms/form_model_gui_template.xml Mon 
Feb  7 07:38:28 2005
@@ -30,7 +30,7 @@
   <title>Form GUI</title>
 
   <content>
-    <ft:form-template action="#{$continuation/id}.continue" method="POST">
+    <ft:form-template action="#{$cocoon/continuation/id}.continue" 
method="POST">
 
       <ft:class id="id-class"><ft:widget-label id="id"/>:<ft:widget 
id="id"/></ft:class>
       <ft:class id="label-class"><ft:widget-label id="label"/>:<ft:widget 
id="label"/></ft:class>

Modified: cocoon/trunk/src/blocks/forms/samples/forms/htmlarea_template.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/samples/forms/htmlarea_template.xml?view=diff&r1=151720&r2=151721
==============================================================================
--- cocoon/trunk/src/blocks/forms/samples/forms/htmlarea_template.xml (original)
+++ cocoon/trunk/src/blocks/forms/samples/forms/htmlarea_template.xml Mon Feb  
7 07:38:28 2005
@@ -18,7 +18,7 @@
       xmlns:fi="http://apache.org/cocoon/forms/1.0#instance";>
   <title>HTMLArea</title>
   <content>
-    <ft:form-template action="#{$continuation/id}.continue" method="POST">
+    <ft:form-template action="#{$cocoon/continuation/id}.continue" 
method="POST">
       <div style="width:500px">
         <ft:widget-label id="data1"/><br/>
         <ft:widget id="data1">

Modified: cocoon/trunk/src/blocks/forms/samples/forms/multipage_template.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/samples/forms/multipage_template.xml?view=diff&r1=151720&r2=151721
==============================================================================
--- cocoon/trunk/src/blocks/forms/samples/forms/multipage_template.xml 
(original)
+++ cocoon/trunk/src/blocks/forms/samples/forms/multipage_template.xml Mon Feb  
7 07:38:28 2005
@@ -26,7 +26,7 @@
   
   <title>Sample multipage form</title>
   <content>
-    <ft:form-template action="#{$continuation/id}.continue" method="POST">
+    <ft:form-template action="#{$cocoon/continuation/id}.continue" 
method="POST">
       <div style="width: 70%; margin: 10px 50px 50px 50px;">
        
         <ft:struct id="page1">

Modified: cocoon/trunk/src/blocks/forms/samples/forms/registration_template.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/samples/forms/registration_template.xml?view=diff&r1=151720&r2=151721
==============================================================================
--- cocoon/trunk/src/blocks/forms/samples/forms/registration_template.xml 
(original)
+++ cocoon/trunk/src/blocks/forms/samples/forms/registration_template.xml Mon 
Feb  7 07:38:28 2005
@@ -18,7 +18,7 @@
   xmlns:fi="http://apache.org/cocoon/forms/1.0#instance";>
   <title>Registration</title>
   <content>
-    <ft:form-template action="#{$continuation/id}.continue" method="POST">
+    <ft:form-template action="#{$cocoon/continuation/id}.continue" 
method="POST">
       <fi:group>
         <fi:styling layout="columns"/>
         <fi:items>

Modified: cocoon/trunk/src/blocks/forms/samples/forms/tasktree_template.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/samples/forms/tasktree_template.xml?view=diff&r1=151720&r2=151721
==============================================================================
--- cocoon/trunk/src/blocks/forms/samples/forms/tasktree_template.xml (original)
+++ cocoon/trunk/src/blocks/forms/samples/forms/tasktree_template.xml Mon Feb  
7 07:38:28 2005
@@ -65,7 +65,7 @@
     
   </style>
   <content>
-    <ft:form-template action="#{$continuation/id}.continue" method="POST">
+    <ft:form-template action="#{$cocoon/continuation/id}.continue" 
method="POST">
     
       <ft:class id="task-class">
         <div class="section">

Modified: cocoon/trunk/src/blocks/forms/samples/forms/upload_template.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/samples/forms/upload_template.xml?view=diff&r1=151720&r2=151721
==============================================================================
--- cocoon/trunk/src/blocks/forms/samples/forms/upload_template.xml (original)
+++ cocoon/trunk/src/blocks/forms/samples/forms/upload_template.xml Mon Feb  7 
07:38:28 2005
@@ -21,7 +21,7 @@
     <para>
     For this example to work, you must enable uploads in your web.xml file.
     </para>
-    <ft:form-template action="#{$continuation/id}.continue" method="POST" 
enctype="multipart/form-data">
+    <ft:form-template action="#{$cocoon/continuation/id}.continue" 
method="POST" enctype="multipart/form-data">
       <fi:group>
         <fi:styling layout="columns"/>
         <fi:items>

Modified: cocoon/trunk/src/blocks/forms/samples/forms/xdoceditor_template.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/samples/forms/xdoceditor_template.xml?view=diff&r1=151720&r2=151721
==============================================================================
--- cocoon/trunk/src/blocks/forms/samples/forms/xdoceditor_template.xml 
(original)
+++ cocoon/trunk/src/blocks/forms/samples/forms/xdoceditor_template.xml Mon Feb 
 7 07:38:28 2005
@@ -38,7 +38,7 @@
   </style>
   
   <content>
-    <ft:form-template action="#{$continuation/id}.continue" method="POST">
+    <ft:form-template action="#{$cocoon/continuation/id}.continue" 
method="POST">
     
     <p>This is an example of how dynamic templates (using the JX macros) allow 
to change the
        page structure depending on the form contents. By adding or removing 
rows in the repeater

Modified: 
cocoon/trunk/src/blocks/forms/samples/swan/data/form_model_gui_template_data.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/samples/swan/data/form_model_gui_template_data.xml?view=diff&r1=151720&r2=151721
==============================================================================
--- 
cocoon/trunk/src/blocks/forms/samples/swan/data/form_model_gui_template_data.xml
 (original)
+++ 
cocoon/trunk/src/blocks/forms/samples/swan/data/form_model_gui_template_data.xml
 Mon Feb  7 07:38:28 2005
@@ -30,7 +30,7 @@
   <title>Form GUI</title>
 
   <content>
-    <ft:form-template action="#{$continuation/id}.continue" method="POST">
+    <ft:form-template action="#{$cocoon/continuation/id}.continue" 
method="POST">
 
       <ft:class id="id-class"><ft:widget-label id="id"/>:<ft:widget 
id="id"/></ft:class>
       <ft:class id="label-class"><ft:widget-label id="label"/>:<ft:widget 
id="label"/></ft:class>

Modified: 
cocoon/trunk/src/blocks/forms/samples/swan/data/sample_form_1_template.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/samples/swan/data/sample_form_1_template.xml?view=diff&r1=151720&r2=151721
==============================================================================
--- cocoon/trunk/src/blocks/forms/samples/swan/data/sample_form_1_template.xml 
(original)
+++ cocoon/trunk/src/blocks/forms/samples/swan/data/sample_form_1_template.xml 
Mon Feb  7 07:38:28 2005
@@ -30,7 +30,7 @@
   <title>Form GUI</title>
 
   <content>
-    <ft:form-template action="#{$continuation/id}.continue" method="POST">
+    <ft:form-template action="#{$cocoon/continuation/id}.continue" 
method="POST">
 
       <ft:widget-label id="samp-field"/>:<ft:widget id="samp-field"/>
       <ft:widget-label id="output-field"/>:<ft:widget id="output-field"/>

Modified: 
cocoon/trunk/src/blocks/forms/samples/swan/data/sample_form_2_template.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/samples/swan/data/sample_form_2_template.xml?view=diff&r1=151720&r2=151721
==============================================================================
--- cocoon/trunk/src/blocks/forms/samples/swan/data/sample_form_2_template.xml 
(original)
+++ cocoon/trunk/src/blocks/forms/samples/swan/data/sample_form_2_template.xml 
Mon Feb  7 07:38:28 2005
@@ -30,7 +30,7 @@
   <title>Form GUI</title>
 
   <content>
-    <ft:form-template action="#{$continuation/id}.continue" method="POST">
+    <ft:form-template action="#{$cocoon/continuation/id}.continue" 
method="POST">
 
       <ft:class id="id-class"><ft:widget-label id="id"/>:<ft:widget 
id="id"/></ft:class>
       <ft:class id="label-class"><ft:widget-label id="label"/>:<ft:widget 
id="label"/></ft:class>

Modified: cocoon/trunk/src/blocks/forms/samples/swan/forms/binding_template.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/samples/swan/forms/binding_template.xml?view=diff&r1=151720&r2=151721
==============================================================================
--- cocoon/trunk/src/blocks/forms/samples/swan/forms/binding_template.xml 
(original)
+++ cocoon/trunk/src/blocks/forms/samples/swan/forms/binding_template.xml Mon 
Feb  7 07:38:28 2005
@@ -28,7 +28,7 @@
   <title>Swan Form Binding Editor</title>
 
   <content>
-    <ft:form-template action="#{$continuation/id}.continue" method="POST">
+    <ft:form-template action="#{$cocoon/continuation/id}.continue" 
method="POST">
 
       <ft:class id="out-id-class">
         <b><ft:widget-label id="id"/>:</b>

Modified: cocoon/trunk/src/blocks/forms/samples/swan/forms/model_template.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/samples/swan/forms/model_template.xml?view=diff&r1=151720&r2=151721
==============================================================================
--- cocoon/trunk/src/blocks/forms/samples/swan/forms/model_template.xml 
(original)
+++ cocoon/trunk/src/blocks/forms/samples/swan/forms/model_template.xml Mon Feb 
 7 07:38:28 2005
@@ -28,7 +28,7 @@
   <title>Swan Form Model Editor</title>
 
   <content>
-    <ft:form-template action="#{$continuation/id}.continue" method="POST">
+    <ft:form-template action="#{$cocoon/continuation/id}.continue" 
method="POST">
 
       <ft:class id="out-id-class">
         <b><ft:widget-label id="id"/>:</b>

Modified: cocoon/trunk/src/blocks/forms/samples/swan/forms/sitemap_template.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/samples/swan/forms/sitemap_template.xml?view=diff&r1=151720&r2=151721
==============================================================================
--- cocoon/trunk/src/blocks/forms/samples/swan/forms/sitemap_template.xml 
(original)
+++ cocoon/trunk/src/blocks/forms/samples/swan/forms/sitemap_template.xml Mon 
Feb  7 07:38:28 2005
@@ -28,7 +28,7 @@
   <title>Swan Cocoon Sitemap Editor</title>
 
   <content>
-    <ft:form-template action="#{$continuation/id}.continue" method="POST">
+    <ft:form-template action="#{$cocoon/continuation/id}.continue" 
method="POST">
 
       <ft:class id="ocontinuation-class">
         <ft:widget-label id="continuation"/>:

Modified: cocoon/trunk/src/blocks/forms/samples/swan/forms/template_template.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/samples/swan/forms/template_template.xml?view=diff&r1=151720&r2=151721
==============================================================================
--- cocoon/trunk/src/blocks/forms/samples/swan/forms/template_template.xml 
(original)
+++ cocoon/trunk/src/blocks/forms/samples/swan/forms/template_template.xml Mon 
Feb  7 07:38:28 2005
@@ -28,7 +28,7 @@
   <title>Swan Form Template Editor</title>
 
   <content>
-    <ft:form-template action="#{$continuation/id}.continue" method="POST">
+    <ft:form-template action="#{$cocoon/continuation/id}.continue" 
method="POST">
 
       <ft:class id="id-class">
         <ft:widget-label id="id"/>:<ft:widget id="id"/>

Modified: cocoon/trunk/src/blocks/forms/samples/swan/forms/xreport_template.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/samples/swan/forms/xreport_template.xml?view=diff&r1=151720&r2=151721
==============================================================================
--- cocoon/trunk/src/blocks/forms/samples/swan/forms/xreport_template.xml 
(original)
+++ cocoon/trunk/src/blocks/forms/samples/swan/forms/xreport_template.xml Mon 
Feb  7 07:38:28 2005
@@ -63,7 +63,7 @@
   <title>xReport Editor</title>
 
   <content>
-    <ft:form-template action="#{$continuation/id}.continue" method="POST">
+    <ft:form-template action="#{$cocoon/continuation/id}.continue" 
method="POST">
 
       <ft:class id="output-id-class">
         <b><ft:widget-label id="id"/>:</b>

Modified: 
cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/copletManagement/LayoutActions.java
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/copletManagement/LayoutActions.java?view=diff&r1=151720&r2=151721
==============================================================================
--- 
cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/copletManagement/LayoutActions.java
 (original)
+++ 
cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/copletManagement/LayoutActions.java
 Mon Feb  7 07:38:28 2005
@@ -83,7 +83,7 @@
                                        
                                        Item itemElem = (Item) iter.next();
                                        
-                                       
if(itemElem.equals(((NamedItem)layoutObj))) {
+                                       if (itemElem.equals(layoutObj)) {
                                                items.remove 
(iter.nextIndex()-1);
                                                return true;
                                        }

Modified: 
cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/copletManagement/generation/XMLProfileGenerator.java
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/copletManagement/generation/XMLProfileGenerator.java?view=diff&r1=151720&r2=151721
==============================================================================
--- 
cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/copletManagement/generation/XMLProfileGenerator.java
 (original)
+++ 
cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/copletManagement/generation/XMLProfileGenerator.java
 Mon Feb  7 07:38:28 2005
@@ -28,8 +28,6 @@
 import org.apache.cocoon.components.flow.FlowHelper;
 import org.apache.cocoon.components.persistence.CastorSourceConverter;
 import org.apache.cocoon.components.persistence.ConverterException;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
 import org.apache.cocoon.generation.ServiceableGenerator;
 import org.apache.commons.jxpath.DynamicPropertyHandler;
 import org.apache.commons.jxpath.JXPathBeanInfo;
@@ -54,7 +52,6 @@
         
         SAXParser parser = null;
         CastorSourceConverter converter = null;
-        final Request request = ObjectModelHelper.getRequest(this.objectModel);
         final Object context = FlowHelper.getContextObject(this.objectModel);
         Map myMap = new HashMap();
         if (context instanceof Map) {

Modified: 
cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/transformation/ProxyTransformer.java
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/transformation/ProxyTransformer.java?view=diff&r1=151720&r2=151721
==============================================================================
--- 
cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/transformation/ProxyTransformer.java
 (original)
+++ 
cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/transformation/ProxyTransformer.java
 Mon Feb  7 07:38:28 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
+ * Copyright 1999-2002,2004-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,6 +20,7 @@
 import java.io.InputStream;
 import java.io.PrintWriter;
 import java.io.StringWriter;
+import java.io.UnsupportedEncodingException;
 import java.net.HttpURLConnection;
 import java.net.MalformedURLException;
 import java.net.URL;
@@ -137,6 +138,9 @@
      */
     protected String userAgent;
 
+    /** The sitemap parameters */
+    protected Parameters parameters;
+
     /* (non-Javadoc)
      * @see 
org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
      */
@@ -146,17 +150,11 @@
     }
 
     /**
-     * For the proxy transformer the envelope-tag and the protocol-handler 
(for https) parameter can be specified.
+     * For the proxy transformer the envelope-tag parameter can be specified.
      * @see 
org.apache.avalon.framework.parameters.Parameterizable#parameterize(Parameters)
      */
     public void parameterize(Parameters parameters) {
         this.defaultEnvelopeTag = 
parameters.getParameter(ENVELOPE_TAG_PARAMETER, null);
-        String protocolHandler = 
parameters.getParameter(PROTOCOL_HANDLER_PARAMETER, null);
-        if (protocolHandler != null) {
-            if (System.getProperty("java.protocol.handler.pkgs") == null) {
-                System.setProperty("java.protocol.handler.pkgs", 
protocolHandler);
-            }
-        }
     }
 
     /**
@@ -167,7 +165,7 @@
                       String src,
                       Parameters parameters)
     throws ProcessingException, SAXException, IOException {
-
+        this.parameters = parameters;
         this.request = ObjectModelHelper.getRequest(objectModel);
 
         this.copletInstanceData = getInstanceData(this.manager, objectModel, 
parameters);
@@ -208,6 +206,7 @@
         this.documentBase = null;
         this.link = null;
         this.request = null;
+        this.parameters = null;
     }
 
     /**
@@ -252,31 +251,32 @@
                 remoteURI = remoteURI.substring(0, pos);
             }
 
-            Enumeration enumeration = request.getParameterNames();
-
+            // append all parameters of the current request, except those where
+            // the name of the request parameter starts with "cocoon-portal-"
+            final Enumeration enumeration = request.getParameterNames();
             while (enumeration.hasMoreElements()) {
                 String paramName = (String) enumeration.nextElement();
 
                 if (!paramName.startsWith("cocoon-portal-")) {
-                    String[] paramValues =
-                        request.getParameterValues(paramName);
+                    String[] paramValues = 
request.getParameterValues(paramName);
                     for (int i = 0; i < paramValues.length; i++) {
-                        if (firstparameter) {
-                            if (!post) {
-                                query.append('?');
-                            }
-                            firstparameter = false;
-                        }
-                        else {
-                            query.append('&');
-                        }
-
-                        query.append(NetUtils.encode(paramName, "utf-8"));
-                        query.append('=');
-                        query.append(NetUtils.encode(paramValues[i], "utf-8"));
+                        firstparameter = this.appendParameter(query, 
firstparameter, post, paramName, paramValues[i]);
                     }
                 }
             }
+            
+            // now append parameters from the sitemap - if any
+            final String[] names = this.parameters.getNames();
+            for(int i=0; i<names.length; i++) {
+                if ( names[i].startsWith("add:") ) {
+                    final String value = 
this.parameters.getParameter(names[i]);
+                    if ( value != null && value.trim().length() > 0 ) {
+                        final String pName = names[i].substring(4);
+                        firstparameter = this.appendParameter(query, 
firstparameter, post, pName, value.trim());                        
+                    }
+                }
+                
+            }
 
             Document result = null;
             try {
@@ -313,6 +313,27 @@
         }
     }
 
+    protected boolean appendParameter(StringBuffer buffer,
+                                      boolean firstparameter, 
+                                      boolean post, 
+                                      String name, 
+                                      String value) 
+    throws UnsupportedEncodingException {
+        if (firstparameter) {
+            if (!post) {
+                buffer.append('?');
+            }
+            firstparameter = false;
+        } else {
+            buffer.append('&');
+        }
+
+        buffer.append(NetUtils.encode(name, "utf-8"));
+        buffer.append('=');
+        buffer.append(NetUtils.encode(value, "utf-8"));
+
+        return firstparameter;
+    }
     /**
      * Check the http status code of the http response to detect any redirects.
      * @param connection The HttpURLConnection

Modified: 
cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portlet/CocoonPortlet.java
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portlet/CocoonPortlet.java?view=diff&r1=151720&r2=151721
==============================================================================
--- 
cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portlet/CocoonPortlet.java
 (original)
+++ 
cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portlet/CocoonPortlet.java
 Mon Feb  7 07:38:28 2005
@@ -273,6 +273,7 @@
             try {
                 Thread.currentThread().setContextClassLoader(this.classLoader);
             } catch (Exception e) {
+                // ignore
             }
         }
 
@@ -374,7 +375,11 @@
                 getLogger().debug("Using default work-directory " + 
this.workDir);
             }
         }
-        this.appContext.put(ContextHelper.CONTEXT_ROOT_URL, 
this.portletContextURL);
+        try {
+            this.appContext.put(ContextHelper.CONTEXT_ROOT_URL, new 
URL(this.portletContextURL));
+        } catch (MalformedURLException ignore) {
+            // we simply ignore this
+        }
 
         final String uploadDirParam = 
conf.getInitParameter("upload-directory");
         if (uploadDirParam != null) {

Modified: 
cocoon/trunk/src/core/java/org/apache/cocoon/configuration/Settings.java
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/core/java/org/apache/cocoon/configuration/Settings.java?view=diff&r1=151720&r2=151721
==============================================================================
--- cocoon/trunk/src/core/java/org/apache/cocoon/configuration/Settings.java 
(original)
+++ cocoon/trunk/src/core/java/org/apache/cocoon/configuration/Settings.java 
Mon Feb  7 07:38:28 2005
@@ -238,6 +238,11 @@
     protected String overrideLogLevel;
 
     /**
+     * Delay between reload checks for the configuration
+     */
+    protected long configurationReloadDelay = 1000;
+
+    /**
      * Create a new settings object
      */
     public Settings() {
@@ -261,6 +266,8 @@
                         this.initClassloader = BooleanUtils.toBoolean(value);
                     } else if ( key.equals("configuration") ) {
                         this.configuration = value;
+                    } else if ( key.equals("configuration.reloaddelay") ) {
+                        this.configurationReloadDelay = 
NumberUtils.toLong(value);
                     } else if ( key.equals("logging.configuration") ) {
                         this.loggingConfiguration = value;
                     } else if ( key.equals("logging.logger.access") ) {
@@ -649,12 +656,28 @@
         }                
     }
 
+    /**
+     * @return Returns the configurationReloadDelay.
+     */
+    public long getConfigurationReloadDelay() {
+        return configurationReloadDelay;
+    }
+    
+    /**
+     * @param configurationReloadDelay The configurationReloadDelay to set.
+     */
+    public void setConfigurationReloadDelay(long configurationReloadDelay) {
+        this.configurationReloadDelay = configurationReloadDelay;
+    }
+
     /* (non-Javadoc)
      * @see java.lang.Object#toString()
      */
     public String toString() {
+        // FIXME - add all
         return "Settings:\n"+
-               "- Configuration: " + this.configuration + "\n" + 
+               "- Configuration: " + this.configuration + "\n" +
+               "- Configuration-reload-delay: " + 
this.configurationReloadDelay + "\n" +
                "- InitClassloader: " + this.initClassloader + "\n" + 
                "- ForceProperties: " + ( this.forceProperties == null ? "-" : 
this.forceProperties.toString() ) + "\n" +
                "- Logging-Configuration: " + this.loggingConfiguration + "\n" +
@@ -696,6 +719,8 @@
                 value = String.valueOf(this.initClassloader);
             } else if ( sKey.equals("configuration") ) {
                 value = this.configuration;
+            } else if ( sKey.equals("configuration.reloaddelay") ) {
+                value = String.valueOf(this.configurationReloadDelay);
             } else if ( sKey.equals("logging.configuration") ) {
                 value = this.loggingConfiguration;
             } else if ( sKey.equals("logging.logger.access") ) {

Modified: 
cocoon/trunk/src/core/java/org/apache/cocoon/core/container/handler/NonThreadSafePoolableComponentHandler.java
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/core/java/org/apache/cocoon/core/container/handler/NonThreadSafePoolableComponentHandler.java?view=diff&r1=151720&r2=151721
==============================================================================
--- 
cocoon/trunk/src/core/java/org/apache/cocoon/core/container/handler/NonThreadSafePoolableComponentHandler.java
 (original)
+++ 
cocoon/trunk/src/core/java/org/apache/cocoon/core/container/handler/NonThreadSafePoolableComponentHandler.java
 Mon Feb  7 07:38:28 2005
@@ -122,7 +122,7 @@
                 this.permanentlyRemovePoolable( poolable );
             }
 
-            if( ( this.size > 0 ) && this.logger.isDebugEnabled() ) {
+            if( this.size > 0 && this.logger.isDebugEnabled() ) {
                 this.logger.debug( "There were " + this.size
                                    + " outstanding objects when the pool was 
disposed." );
             }
@@ -154,7 +154,7 @@
         Object poolable;
         synchronized( this.semaphore ) {
             // Look for a Poolable at the end of the m_ready list
-            if( this.readySize > 0 ){
+            if ( this.readySize > 0 ){
                 // A poolable is ready and waiting in the pool
                 poolable = this.ready.removeLast();
                 this.readySize--;
@@ -164,7 +164,7 @@
                 poolable = this.factory.newInstance();
                 this.size++;
 
-                if( this.logger.isDebugEnabled() ) {
+                if ( this.logger.isDebugEnabled() ) {
                     this.logger.debug( "Created a new " + 
poolable.getClass().getName()
                                        + " from the object factory." );
                 }

Modified: 
cocoon/trunk/src/core/java/org/apache/cocoon/core/source/SimpleSourceResolver.java
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/core/java/org/apache/cocoon/core/source/SimpleSourceResolver.java?view=diff&r1=151720&r2=151721
==============================================================================
--- 
cocoon/trunk/src/core/java/org/apache/cocoon/core/source/SimpleSourceResolver.java
 (original)
+++ 
cocoon/trunk/src/core/java/org/apache/cocoon/core/source/SimpleSourceResolver.java
 Mon Feb  7 07:38:28 2005
@@ -92,18 +92,11 @@
                 contextBase = 
((File)context.get("context-root")).toURL().toExternalForm();
             }
         } catch(ContextException ce) {
-            //FIXME: Cocoon's CONTEXT_ROOT_URL context entry should be made 
consistent with Excalibur
+            // set the base URL to the current directory
             try {
-                contextBase = new 
URL((String)context.get("root-url")).toExternalForm();
-            } catch (MalformedURLException mue) {
-                throw new ContextException("Malformed URL for root-url", mue);
-            } catch (ContextException e) {
-                // set the base URL to the current directory
-                try {
-                    contextBase = new 
File(System.getProperty("user.dir")).toURL().toExternalForm();
-                } catch( MalformedURLException mue) {
-                    throw new ContextException( "Malformed URL for user.dir, 
and no context-root exists", mue);
-                }
+                contextBase = new 
File(System.getProperty("user.dir")).toURL().toExternalForm();
+            } catch( MalformedURLException mue) {
+                throw new ContextException( "Malformed URL for user.dir, and 
no context-root exists", mue);
             }
         } catch( MalformedURLException mue) {
             throw new ContextException("Malformed URL for context-root", mue);

Modified: 
cocoon/trunk/src/documentation/xdocs/userdocs/forms/templatetransformer.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/documentation/xdocs/userdocs/forms/templatetransformer.xml?view=diff&r1=151720&r2=151721
==============================================================================
--- cocoon/trunk/src/documentation/xdocs/userdocs/forms/templatetransformer.xml 
(original)
+++ cocoon/trunk/src/documentation/xdocs/userdocs/forms/templatetransformer.xml 
Mon Feb  7 07:38:28 2005
@@ -100,10 +100,10 @@
         embed dynamic data in the action attribute. One of the most common uses
         is to embed the continuation id (if you're using flowscript), for 
example:</p>
 
-        <source><![CDATA[<ft:form-template 
action="#{$continuation/id}.continue" ...]]></source>
+        <source><![CDATA[<ft:form-template 
action="#{$cocoon/continuation/id}.continue" ...]]></source>
 
-        <p>The following objects are available in the JXPath context: 
continuation,
-        requests, session and parameters. The context of the JXPath expression 
is
+        <p>The following objects are available in the JXPath context via the 
cocoon object: 
+        continuation, requests, session and parameters. The context of the 
JXPath expression is
         the map passed on from the flowscript (if any).</p>
 
         <p>The <strong>location</strong> attribute, if present, is used to 
retrieve

Modified: cocoon/trunk/src/java/org/apache/cocoon/Cocoon.java
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/Cocoon.java?view=diff&r1=151720&r2=151721
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/Cocoon.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/Cocoon.java Mon Feb  7 07:38:28 2005
@@ -134,30 +134,23 @@
         this.parentServiceManager = manager;
     }
 
-    /**
-     * Describe <code>contextualize</code> method here.
-     *
-     * @param context a <code>Context</code> value
-     * @exception ContextException if an error occurs
+    /* (non-Javadoc)
+     * @see 
org.apache.avalon.framework.context.Contextualizable#contextualize(org.apache.avalon.framework.context.Context)
      */
     public void contextualize(Context context) throws ContextException {
-        if (this.context == null) {
-            this.context = new ComponentContext(context);
-            ((DefaultContext)this.context).makeReadOnly();
-
-            try {
-                // FIXME : add a configuration option for the refresh delay.
-                // for now, hard-coded to 1 second.
-                URLSource urlSource = new URLSource();
-                urlSource.init((URL) 
context.get(Constants.CONTEXT_CONFIG_URL), null);
-                this.configurationFile = new 
DelayedRefreshSourceWrapper(urlSource,
-                                                                         
1000L);
-
-            } catch (IOException ioe) {
-                throw new ContextException("Could not open configuration 
file.", ioe);
-            } catch (Exception e) {
-                throw new ContextException("contextualize(..) Exception", e);
-            }
+        this.context = new ComponentContext(context);
+        ((DefaultContext)this.context).makeReadOnly();
+
+        final Settings settings = Core.getSettings(this.context);
+        final URL u = (URL)this.context.get(Constants.CONTEXT_CONFIG_URL);
+        try {
+            URLSource urlSource = new URLSource();
+            urlSource.init(u, null);
+            this.configurationFile = new DelayedRefreshSourceWrapper(urlSource,
+                                                                     
settings.getConfigurationReloadDelay());
+
+        } catch (IOException ioe) {
+            throw new ContextException("Could not open configuration file: " + 
u, ioe);
         }
     }
 
@@ -171,10 +164,8 @@
         this.loggerManager = loggerManager;
     }
 
-    /**
-     * The <code>initialize</code> method
-     *
-     * @exception Exception if an error occurs
+    /* (non-Javadoc)
+     * @see org.apache.avalon.framework.activity.Initializable#initialize()
      */
     public void initialize() throws Exception {
         this.serviceManager = new 
CocoonServiceManager(this.parentServiceManager);
@@ -198,7 +189,7 @@
         this.processor = (Processor)this.serviceManager.lookup(Processor.ROLE);
 
         this.environmentHelper = new EnvironmentHelper(
-                (String) this.context.get(ContextHelper.CONTEXT_ROOT_URL));
+                (URL) this.context.get(ContextHelper.CONTEXT_ROOT_URL));
         ContainerUtil.enableLogging(this.environmentHelper, getLogger());
         ContainerUtil.service(this.environmentHelper, this.serviceManager);
 

Modified: cocoon/trunk/src/java/org/apache/cocoon/bean/CocoonWrapper.java
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/bean/CocoonWrapper.java?view=diff&r1=151720&r2=151721
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/bean/CocoonWrapper.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/bean/CocoonWrapper.java Mon Feb  7 
07:38:28 2005
@@ -159,7 +159,7 @@
             appContext.put(Constants.CONTEXT_CACHE_DIR, cacheDir);
             appContext.put(Constants.CONTEXT_CONFIG_URL, conf.toURL());
             appContext.put(Constants.CONTEXT_DEFAULT_ENCODING, "ISO-8859-1");
-            appContext.put(ContextHelper.CONTEXT_ROOT_URL, 
this.context.toURL().toExternalForm());
+            appContext.put(ContextHelper.CONTEXT_ROOT_URL, 
this.context.toURL());
             // FIXME - add settings
             appContext.put(Core.CONTEXT_SETTINGS, new Settings());
 

Modified: cocoon/trunk/src/java/org/apache/cocoon/components/ContextHelper.java
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/components/ContextHelper.java?view=diff&r1=151720&r2=151721
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/components/ContextHelper.java 
(original)
+++ cocoon/trunk/src/java/org/apache/cocoon/components/ContextHelper.java Mon 
Feb  7 07:38:28 2005
@@ -47,10 +47,8 @@
     /** Application <code>Context</code> Key for the current sitemap service 
manager */
     public static final String CONTEXT_SITEMAP_SERVICE_MANAGER = 
"sitemap-service-manager";
     
-    /** Application root directory @since 2.2 */
-    // FIXME(SW): it would be better for this to be named "context-root" and 
be a URL to be consistent
-    // with Excalibur's SourceResolverImpl. For now, we use this also in the 
core's SimpleSourceResolver
-    public static final String CONTEXT_ROOT_URL = "root-url";
+    /** Application root directory (as a URL object) @since 2.2 */
+    public static final String CONTEXT_ROOT_URL = "context-root";
     
     private ContextHelper() {
         // Forbid instantiation

Modified: 
cocoon/trunk/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java?view=diff&r1=151720&r2=151721
==============================================================================
--- 
cocoon/trunk/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java
 (original)
+++ 
cocoon/trunk/src/java/org/apache/cocoon/components/treeprocessor/TreeProcessor.java
 Mon Feb  7 07:38:28 2005
@@ -15,6 +15,8 @@
  */
 package org.apache.cocoon.components.treeprocessor;
 
+import java.net.URL;
+
 import org.apache.avalon.framework.activity.Disposable;
 import org.apache.avalon.framework.activity.Initializable;
 import org.apache.avalon.framework.configuration.Configurable;
@@ -174,7 +176,7 @@
         // setup the environment helper
         if (this.environmentHelper == null ) {
             this.environmentHelper = new EnvironmentHelper(
-                    (String) this.context.get(ContextHelper.CONTEXT_ROOT_URL));
+                    (URL) this.context.get(ContextHelper.CONTEXT_ROOT_URL));
         }
         ContainerUtil.enableLogging(this.environmentHelper, getLogger());
         ContainerUtil.service(this.environmentHelper, this.manager);

Modified: 
cocoon/trunk/src/java/org/apache/cocoon/environment/internal/EnvironmentHelper.java
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/environment/internal/EnvironmentHelper.java?view=diff&r1=151720&r2=151721
==============================================================================
--- 
cocoon/trunk/src/java/org/apache/cocoon/environment/internal/EnvironmentHelper.java
 (original)
+++ 
cocoon/trunk/src/java/org/apache/cocoon/environment/internal/EnvironmentHelper.java
 Mon Feb  7 07:38:28 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@
 
 import java.io.IOException;
 import java.net.MalformedURLException;
+import java.net.URL;
 import java.util.Map;
 
 import org.apache.avalon.framework.activity.Disposable;
@@ -40,7 +41,7 @@
  * really need it.
  *
  * @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version CVS $Id: EnvironmentHelper.java,v 1.4 2004/07/08 12:42:27 
vgritsenko Exp $
+ * @version CVS $Id$
  * @since 2.2
  */
 public class EnvironmentHelper
@@ -70,8 +71,10 @@
      * Constructor
      *
      */
-    public EnvironmentHelper(String context) {
-        this.context = context;
+    public EnvironmentHelper(URL context) {
+        if ( context != null ) {
+            this.context = context.toExternalForm();
+        }
     }
 
     /**
@@ -387,9 +390,8 @@
     protected Object childValue(Object parentValue) {
         if ( null != parentValue) {
             return ((EnvironmentStack)parentValue).clone();
-        } else {
-            return null;
         }
+        return null;
     }
 }
 

Modified: cocoon/trunk/src/java/org/apache/cocoon/servlet/CocoonServlet.java
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/servlet/CocoonServlet.java?view=diff&r1=151720&r2=151721
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/servlet/CocoonServlet.java 
(original)
+++ cocoon/trunk/src/java/org/apache/cocoon/servlet/CocoonServlet.java Mon Feb  
7 07:38:28 2005
@@ -314,7 +314,11 @@
                 throw new ServletException("Unable to determine servlet 
context URL.", me);
             }
         }
-        this.appContext.put(ContextHelper.CONTEXT_ROOT_URL, 
this.servletContextURL);
+        try {
+            this.appContext.put(ContextHelper.CONTEXT_ROOT_URL, new 
URL(this.servletContextURL));            
+        } catch (MalformedURLException ignore) {
+            // we simply ignore this
+        }
 
         // Init logger
         initLogger();
@@ -835,6 +839,7 @@
             try {
                 Thread.currentThread().setContextClassLoader(this.classLoader);
             } catch (Exception e) {
+                // ignore
             }
         }
 
@@ -1174,6 +1179,7 @@
             try {
                 Thread.currentThread().setContextClassLoader(this.classLoader);
             } catch (Exception e) {
+                // ignore
             }
         }
 
@@ -1182,6 +1188,7 @@
         forceProperty();
 
         try {
+            this.exception = null;
             URL configFile = (URL) 
this.appContext.get(Constants.CONTEXT_CONFIG_URL);
             if (getLogger().isInfoEnabled()) {
                 getLogger().info("Reloading from: " + 
configFile.toExternalForm());
@@ -1212,9 +1219,8 @@
         final String rootlogger = this.settings.getCocoonLogger();
         if (rootlogger != null) {
             return this.getLoggerManager().getLoggerForCategory(rootlogger);
-        } else {
-            return getLogger();
         }
+        return getLogger();
     }
 
     /**
@@ -1316,9 +1322,8 @@
                 getLogger().debug(name + " was not set - defaulting to '" + 
defaultValue + "'");
             }
             return defaultValue;
-        } else {
-            return result;
         }
+        return result;
     }
 
     protected Logger getLogger() {

Modified: cocoon/trunk/status.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/status.xml?view=diff&r1=151720&r2=151721
==============================================================================
--- cocoon/trunk/status.xml (original)
+++ cocoon/trunk/status.xml Mon Feb  7 07:38:28 2005
@@ -463,6 +463,10 @@
    </action>
  </release>
  <release version="2.1.7" date="TBD">
+   <action dev="CZ" type="fix">
+    CForms: template generator and transformer now use the same object model 
as the JXTG: access
+            to objects have to use the "cocoon" object, like 
"cocoon/continuation/id".
+   </action>
    <action dev="CZ" type="fix" fixes-bug="32987" due-to="Michal Durdina" 
due-to-email="[EMAIL PROTECTED]">
      Apply patch for a better exception handling in the Meta-InputModule when 
an input module is not found.
    </action>


Reply via email to