cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: rev 57427 - in cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/environment: . wrapper
Date Thu, 11 Nov 2004 12:28:58 GMT
Author: cziegeler
Date: Thu Nov 11 04:28:57 2004
New Revision: 57427

Modified:
   cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/environment/ForwardRedirector.java
   cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/environment/wrapper/EnvironmentWrapper.java
Log:
Fix bug in global redirect

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/environment/ForwardRedirector.java
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/environment/ForwardRedirector.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/environment/ForwardRedirector.java
Thu Nov 11 04:28:57 2004
@@ -20,6 +20,7 @@
 import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.cocoon.ProcessingException;
 import org.apache.cocoon.environment.wrapper.EnvironmentWrapper;
+import org.apache.cocoon.environment.wrapper.MutableEnvironmentFacade;
 
 /**
  * A base class for <code>Redirector</code>s that handle forward redirects, i.e.
internal
@@ -28,7 +29,7 @@
  * Concrete subclasses have to define the <code>cocoonRedirect()</code> method.
  *
  * @author <a href="mailto:sylvain@apache.org">Sylvain Wallez</a>
- * @version CVS $Id: ForwardRedirector.java,v 1.13 2004/03/05 13:02:54 bdelacretaz Exp $
+ * @version CVS $Id$
  */
 public abstract class ForwardRedirector extends AbstractLogEnabled implements Redirector,
PermanentRedirector {
 
@@ -91,6 +92,8 @@
         // FIXME : how to handle global redirect to cocoon: ?
         if (url.startsWith("cocoon:")) {
             cocoonRedirect(url);
+        } else if (env instanceof MutableEnvironmentFacade ) {
+            ((MutableEnvironmentFacade)env).getDelegate().globalRedirect(sessionMode, url);
         } else if (env instanceof EnvironmentWrapper) {
             ((EnvironmentWrapper)env).globalRedirect(sessionMode,url);
         } else {

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/environment/wrapper/EnvironmentWrapper.java
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/environment/wrapper/EnvironmentWrapper.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/environment/wrapper/EnvironmentWrapper.java
Thu Nov 11 04:28:57 2004
@@ -293,6 +293,8 @@
     throws IOException {
         if (environment instanceof EnvironmentWrapper) {
             ((EnvironmentWrapper)environment).globalRedirect(sessionmode, newURL);
+        } else if ( environment instanceof MutableEnvironmentFacade ) {
+            ((MutableEnvironmentFacade)environment).getDelegate().globalRedirect(sessionmode,
newURL);
         } else {
             environment.redirect(sessionmode,newURL);
         }

Mime
View raw message