You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cd...@apache.org on 2012/03/22 12:13:05 UTC

svn commit: r1303732 - /cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/ConcreteTreeProcessor.java

Author: cdamioli
Date: Thu Mar 22 11:13:05 2012
New Revision: 1303732

URL: http://svn.apache.org/viewvc?rev=1303732&view=rev
Log:
COCOON-2319 Bad Environment context when redirecting to cocoon:// with a sitemap not located in the webapp context

Modified:
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/ConcreteTreeProcessor.java

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/ConcreteTreeProcessor.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/ConcreteTreeProcessor.java?rev=1303732&r1=1303731&r2=1303732&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/ConcreteTreeProcessor.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/ConcreteTreeProcessor.java Thu Mar 22 11:13:05 2012
@@ -287,8 +287,10 @@ public class ConcreteTreeProcessor exten
         // Get the processor that should process this request
         // (see https://issues.apache.org/jira/browse/COCOON-1990).
         ConcreteTreeProcessor processor = this;
-        if (uri.startsWith("cocoon://"))
+        if (uri.startsWith("cocoon://")) {
             processor = ((TreeProcessor)getRootProcessor()).concreteProcessor;
+            newEnv.changeContext("", ((TreeProcessor)getRootProcessor()).source.getURI());
+        }
 
         // Process the redirect
         // No more reset since with TreeProcessorRedirector, we need to pop values from the redirect location