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

[email protected]
Newsgroups gmane.text.xml.cocoon.cvs
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.