You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by so...@apache.org on 2009/02/13 18:47:32 UTC
svn commit: r744191 - in /myfaces/trinidad/trunk: ./ trinidad-api/
trinidad-api/src/main/java/org/apache/myfaces/trinidad/config/
trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/
trinidad-impl/src/main/java/org/apache/myfaces/trinidadintern...
Author: sobryan
Date: Fri Feb 13 17:47:31 2009
New Revision: 744191
URL: http://svn.apache.org/viewvc?rev=744191&view=rev
Log:
TRINIDAD-1376: NullPointerException because RequestContext released after action request.
TRINIDAD-1377: ActionRequest not properly detected.
TRINIDAD-1351: On a redirect the URL is not being properly encoded for portals.
TRINIDAD-1383: Update to support latest changes in portlet-bridge.
This patch fixes the above Portal related bugs for Trinidad. Here is what was done:
* The portlet bridge api was added to the Trinidad API project which now uses the bridge's @ExcludeFromManagedRequestScope annotaton on the RequestStateMap
* Added a new RequestStateMap utility that has a request map which spans one action request and the following render request. Most of the configurator state was enhanced to use this map.
* Fixed a problem in ExternalContextUtils where it was incorrectly identifying action requests in a portal environment if the RenderRequest was a subclass of the ServletRequest object
* Fixed an encoding issue before the redirect in the CoreRenderkit
Thanks to Felix, Robert, and Nathan for finding these issues, submitting patches, and helping to test the final fixes.
Added:
myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/RequestStateMap.java
Modified:
myfaces/trinidad/trunk/pom.xml
myfaces/trinidad/trunk/trinidad-api/pom.xml
myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/config/Configurator.java
myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/ExternalContextUtils.java
myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/PortletUtils.java
myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/StateManagerImpl.java
myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/GlobalConfiguratorImpl.java
myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/dispatch/DispatchResponseConfiguratorImpl.java
myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/upload/FileUploadConfiguratorImpl.java
myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/CoreRenderKit.java
Modified: myfaces/trinidad/trunk/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/pom.xml?rev=744191&r1=744190&r2=744191&view=diff
==============================================================================
--- myfaces/trinidad/trunk/pom.xml (original)
+++ myfaces/trinidad/trunk/pom.xml Fri Feb 13 17:47:31 2009
@@ -47,7 +47,7 @@
<jsf-ri.version>1.2_09</jsf-ri.version>
<jsf-myfaces.version>1.2.4</jsf-myfaces.version>
<jsf-facelets.version>1.1.14</jsf-facelets.version>
- <portlet-bridge.version>1.0.0-alpha-2</portlet-bridge.version>
+ <portlet-bridge.version>1.0.0-beta</portlet-bridge.version>
<commons-lang.version>2.4</commons-lang.version>
<!-- Testing -->
Modified: myfaces/trinidad/trunk/trinidad-api/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-api/pom.xml?rev=744191&r1=744190&r2=744191&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-api/pom.xml (original)
+++ myfaces/trinidad/trunk/trinidad-api/pom.xml Fri Feb 13 17:47:31 2009
@@ -56,6 +56,11 @@
</dependency>
<dependency>
+ <groupId>org.apache.myfaces.portlet-bridge</groupId>
+ <artifactId>portlet-bridge-api</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-api</artifactId>
<scope>provided</scope> <!-- force provided scope here -->
Modified: myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/config/Configurator.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/config/Configurator.java?rev=744191&r1=744190&r2=744191&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/config/Configurator.java (original)
+++ myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/config/Configurator.java Fri Feb 13 17:47:31 2009
@@ -21,6 +21,8 @@
import javax.faces.context.ExternalContext;
import javax.servlet.ServletRequest;
+import org.apache.myfaces.trinidad.util.RequestStateMap;
+
/**
* This defines an abstract class for the Configurator. Classes implementing
* this abstraction should be listed in the jar's /META-INF/services folder
@@ -158,7 +160,7 @@
*/
public static final void disableConfiguratorServices(ServletRequest srq)
{
- srq.setAttribute(_DISABLE_SERVICES, Boolean.TRUE);
+ RequestStateMap.getInstance(srq).put(_DISABLE_SERVICES, Boolean.TRUE);
}
/**
@@ -180,7 +182,7 @@
*/
protected static final boolean isConfiguratorServiceDisabled(ExternalContext ec)
{
- return Boolean.TRUE.equals(ec.getRequestMap().get(_DISABLE_SERVICES));
+ return Boolean.TRUE.equals(RequestStateMap.getInstance(ec).get(_DISABLE_SERVICES));
}
static private final String _DISABLE_SERVICES = Configurator.class.getName()+".DISABLE_SERVICES";
Modified: myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/ExternalContextUtils.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/ExternalContextUtils.java?rev=744191&r1=744190&r2=744191&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/ExternalContextUtils.java (original)
+++ myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/ExternalContextUtils.java Fri Feb 13 17:47:31 2009
@@ -299,7 +299,7 @@
return request instanceof ServletRequest;
}
- return request instanceof ServletRequest || _PORTLET_ACTION_REQUEST_CLASS.isInstance(request);
+ return (!isPortlet(externalContext) && request instanceof ServletRequest) || _PORTLET_ACTION_REQUEST_CLASS.isInstance(request);
}
/**
Added: myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/RequestStateMap.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/RequestStateMap.java?rev=744191&view=auto
==============================================================================
--- myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/RequestStateMap.java (added)
+++ myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/RequestStateMap.java Fri Feb 13 17:47:31 2009
@@ -0,0 +1,92 @@
+package org.apache.myfaces.trinidad.util;
+
+import java.lang.reflect.Method;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import javax.faces.context.ExternalContext;
+
+import javax.portlet.faces.annotation.ExcludeFromManagedRequestScope;
+
+import javax.servlet.ServletRequest;
+
+/**
+ * TODO: get rid of this object
+ */
+ @ExcludeFromManagedRequestScope
+ public class RequestStateMap extends HashMap<String, Object>
+ {
+ static public RequestStateMap getInstance(ServletRequest req)
+ {
+ RequestStateMap map = (RequestStateMap)req.getAttribute(_STATE_MAP);
+
+ if(map == null)
+ {
+ map = new RequestStateMap();
+ req.setAttribute(_STATE_MAP, map);
+ }
+
+ return map;
+ }
+
+ static public RequestStateMap getInstance(ExternalContext ec)
+ {
+ Map<String, Object> reqMap = ec.getRequestMap();
+ RequestStateMap map = (RequestStateMap)reqMap.get(_STATE_MAP);
+
+ //For now, always check this on a render so it can be removed from the session.
+ //This can be optimized to only save the state when request attributes are NOT preserved
+ if(!ExternalContextUtils.isAction(ec))
+ {
+ String uuid = ec.getRequestParameterMap().get(_STATE_MAP);
+ if(uuid!= null)
+ {
+ RequestStateMap myMap= (RequestStateMap)ec.getSessionMap().remove(_STATE_MAP+"."+uuid);
+ if(map == null)
+ {
+ map = myMap;
+ }
+ else
+ {
+ //TODO: put optimization code here
+ }
+ }
+ }
+
+ if(map == null)
+ {
+ map = new RequestStateMap();
+ reqMap.put(_STATE_MAP, map);
+ }
+
+ return map;
+ }
+
+ private RequestStateMap(){};
+
+ public void saveState(ExternalContext ec)
+ {
+ if(ExternalContextUtils.isPortlet(ec) && ExternalContextUtils.isAction(ec))
+ {
+ try
+ {
+ //TODO: use reflection here but it can be replaced..
+ Object actionResp = ec.getResponse();
+ Method m = actionResp.getClass().getMethod("setRenderParameter", String.class, String.class);
+ String uuid = UUID.randomUUID().toString();
+
+ ec.getRequestMap().put(_STATE_MAP+"."+uuid, this);
+ m.invoke(actionResp, _STATE_MAP, uuid);
+ }
+ catch(Throwable t)
+ {
+ //TODO: Log exception
+ t.printStackTrace();
+ }
+ }
+ }
+
+ private static final String _STATE_MAP = RequestStateMap.class.getName();
+ }
Modified: myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/PortletUtils.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/PortletUtils.java?rev=744191&r1=744190&r2=744191&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/PortletUtils.java (original)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/PortletUtils.java Fri Feb 13 17:47:31 2009
@@ -2,6 +2,8 @@
import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+
import javax.portlet.faces.component.PortletNamingContainerUIViewRoot;
import org.apache.myfaces.trinidad.logging.TrinidadLogger;
@@ -34,14 +36,21 @@
*/
public static final UIViewRoot getPortletViewRoot(UIViewRoot root)
{
- Class<? extends UIViewRoot> rootClass = root.getClass();
//If the current root is not the real UIViewRoot object in faces then
//is no need to escape it. It is assumed it handles namespacing on its
- //own. This is the same as the logic in the JSR-301 Bridge spec.
- if(rootClass == UIViewRoot.class)
+ //own. This is the same as the logic in the JSR-301 Bridge Impl.
+ if(root.getClass() == UIViewRoot.class)
{
- _LOG.fine("Creating PortletUIViewRoot for use with the portal.");
- root = new PortletNamingContainerUIViewRoot(root);
+ FacesContext fc = FacesContext.getCurrentInstance();
+ _LOG.fine("Creating PortletNamingContainerUIViewRoot for use with the portal.");
+ fc.getApplication().addComponent(
+ UIViewRoot.COMPONENT_TYPE,
+ PortletNamingContainerUIViewRoot.class.getName());
+ root = (UIViewRoot) fc.getApplication().createComponent(
+ UIViewRoot.COMPONENT_TYPE);
+ // Restore original mapping.
+ fc.getApplication().addComponent(
+ UIViewRoot.COMPONENT_TYPE, UIViewRoot.class.getName());
}
//TODO: Do we need a warning here if the view root is not annotated
Modified: myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/StateManagerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/StateManagerImpl.java?rev=744191&r1=744190&r2=744191&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/StateManagerImpl.java (original)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/StateManagerImpl.java Fri Feb 13 17:47:31 2009
@@ -1075,10 +1075,12 @@
//This code handles automatic namespacing in a JSR-301 environment
if(ExternalContextUtils.isPortlet(fc.getExternalContext()))
{
- //To avoid introducing a runtime dependency on the bridge,
+ //IMPORTANT: To avoid introducing a runtime dependency on the bridge,
//this method should only be executed when we have a portlet
//request. If we do have a portlet request then the bridge
- //should be available anyway.
+ //should be available anyway. Trinidad has a compile-time dependency
+ //on the PortletBridge API but DOES NOT have a runtime dependency on
+ //those clases. It is very important to keep this seperation.
newRoot = PortletUtils.getPortletViewRoot(newRoot);
}
Modified: myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/GlobalConfiguratorImpl.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/GlobalConfiguratorImpl.java?rev=744191&r1=744190&r2=744191&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/GlobalConfiguratorImpl.java (original)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/GlobalConfiguratorImpl.java Fri Feb 13 17:47:31 2009
@@ -50,6 +50,7 @@
import org.apache.myfaces.trinidadinternal.skin.SkinFactoryImpl;
import org.apache.myfaces.trinidadinternal.skin.SkinUtils;
import org.apache.myfaces.trinidad.util.ExternalContextUtils;
+import org.apache.myfaces.trinidad.util.RequestStateMap;
/**
* This is the implementation of the Trinidad's Global configurator. It provides the entry point for
@@ -134,7 +135,7 @@
*/
static private final boolean _isDisabled(final ExternalContext ec)
{
- final Boolean inRequest = (Boolean) ec.getRequestMap().get(_IN_REQUEST);
+ final Boolean inRequest = (Boolean) RequestStateMap.getInstance(ec).get(_IN_REQUEST);
if (inRequest == null)
{
@@ -203,7 +204,7 @@
_attachRequestContext(externalContext);
- if (externalContext.getRequestMap().get(_IN_REQUEST) == null)
+ if (RequestStateMap.getInstance(externalContext).get(_IN_REQUEST) == null)
{
_startConfiguratorServiceRequest(externalContext);
}
@@ -292,6 +293,7 @@
}
finally
{
+ RequestStateMap.getInstance(externalContext).saveState(externalContext);
_releaseRequestContext(externalContext);
_releaseManagedThreadLocals();
}
@@ -444,7 +446,7 @@
// See if we've got a cached RequestContext instance; if so,
// reattach it
- final Object cachedRequestContext = externalContext.getRequestMap().get(
+ final Object cachedRequestContext = RequestStateMap.getInstance(externalContext).get(
_REQUEST_CONTEXT);
// Catch both the null scenario and the
@@ -459,9 +461,9 @@
final RequestContextFactory factory = RequestContextFactory.getFactory();
assert factory != null;
context = factory.createContext(externalContext);
- externalContext.getRequestMap().put(_REQUEST_CONTEXT, context);
+ RequestStateMap.getInstance(externalContext).put(_REQUEST_CONTEXT, context);
}
-
+
assert RequestContext.getCurrentInstance() == context;
}
@@ -471,7 +473,7 @@
//well want to create a new one next request
if(RequestType.getType(ec) != RequestType.PORTAL_ACTION)
{
- ec.getRequestMap().remove(_REQUEST_CONTEXT);
+ RequestStateMap.getInstance(ec).remove(_REQUEST_CONTEXT);
}
final RequestContext context = RequestContext.getCurrentInstance();
@@ -479,7 +481,6 @@
{
context.release();
assert RequestContext.getCurrentInstance() == null;
-
}
}
@@ -497,7 +498,7 @@
{
// Physical request has now ended
// Clear the in-request flag
- ec.getRequestMap().remove(_IN_REQUEST);
+ RequestStateMap.getInstance(ec).remove(_IN_REQUEST);
if(_services != null)
{
for (final Configurator config : _services)
@@ -514,7 +515,7 @@
final boolean disabled = isConfiguratorServiceDisabled(ec);
// Tell whether the services were disabled when the requests had begun
- ec.getRequestMap().put(_IN_REQUEST, disabled);
+ RequestStateMap.getInstance(ec).put(_IN_REQUEST, disabled);
// If this hasn't been initialized then please initialize
for (final Configurator config : _services)
@@ -700,12 +701,12 @@
public static void clearType(final ExternalContext ec)
{
- ec.getRequestMap().remove(_REQUEST_TYPE);
+ RequestStateMap.getInstance(ec).remove(_REQUEST_TYPE);
}
public static RequestType getType(final ExternalContext ec)
{
- return (RequestType) ec.getRequestMap().get(_REQUEST_TYPE);
+ return (RequestType) RequestStateMap.getInstance(ec).get(_REQUEST_TYPE);
}
public static boolean isCorrectType(final ExternalContext ec)
@@ -716,7 +717,7 @@
@SuppressWarnings("unchecked")
public static void setType(final ExternalContext ec)
{
- ec.getRequestMap().put(_REQUEST_TYPE, _findType(ec));
+ RequestStateMap.getInstance(ec).put(_REQUEST_TYPE, _findType(ec));
}
private static final RequestType _findType(final ExternalContext ec)
@@ -762,7 +763,7 @@
static public final boolean isTestParamPresent(ExternalContext ec)
{
- return ec.getRequestParameterMap().get(_TEST_PARAM) != null;
+ return RequestStateMap.getInstance(ec).get(_TEST_PARAM) != null;
}
static private String _TEST_PARAM = TestRequest.class.getName()+
Modified: myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/dispatch/DispatchResponseConfiguratorImpl.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/dispatch/DispatchResponseConfiguratorImpl.java?rev=744191&r1=744190&r2=744191&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/dispatch/DispatchResponseConfiguratorImpl.java (original)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/dispatch/DispatchResponseConfiguratorImpl.java Fri Feb 13 17:47:31 2009
@@ -25,6 +25,7 @@
import org.apache.myfaces.trinidad.config.Configurator;
import org.apache.myfaces.trinidad.util.ExternalContextUtils;
+import org.apache.myfaces.trinidad.util.RequestStateMap;
/**
* TODO: Document this
@@ -63,8 +64,7 @@
static public String getContentType(
FacesContext context)
{
- Map<String, Object> requestMap = context.getExternalContext().getRequestMap();
- return (String) requestMap.get(__CONTENT_TYPE_KEY);
+ return (String) RequestStateMap.getInstance(context.getExternalContext()).get(__CONTENT_TYPE_KEY);
}
/**
@@ -75,7 +75,7 @@
*/
static public boolean isApplied(ExternalContext context)
{
- return (context.getRequestMap().get(_APPLIED)!=null);
+ return (RequestStateMap.getInstance(context).get(_APPLIED)!=null);
}
/**
@@ -84,7 +84,7 @@
@SuppressWarnings("unchecked")
static public void apply(ExternalContext context)
{
- context.getRequestMap().put(_APPLIED, Boolean.TRUE);
+ RequestStateMap.getInstance(context).put(_APPLIED, Boolean.TRUE);
}
static private final String _APPLIED =
Modified: myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/upload/FileUploadConfiguratorImpl.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/upload/FileUploadConfiguratorImpl.java?rev=744191&r1=744190&r2=744191&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/upload/FileUploadConfiguratorImpl.java (original)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/config/upload/FileUploadConfiguratorImpl.java Fri Feb 13 17:47:31 2009
@@ -35,6 +35,7 @@
import org.apache.myfaces.trinidad.logging.TrinidadLogger;
import org.apache.myfaces.trinidad.model.UploadedFile;
import org.apache.myfaces.trinidad.util.ExternalContextUtils;
+import org.apache.myfaces.trinidad.util.RequestStateMap;
import org.apache.myfaces.trinidadinternal.share.util.MultipartFormHandler;
import org.apache.myfaces.trinidadinternal.share.util.MultipartFormItem;
@@ -68,7 +69,7 @@
*/
static public boolean isApplied(ExternalContext context)
{
- return (context.getRequestMap().get(_APPLIED)!=null);
+ return (RequestStateMap.getInstance(context).get(_APPLIED)!=null);
}
/**
@@ -77,7 +78,7 @@
@SuppressWarnings("unchecked")
static public void apply(ExternalContext context)
{
- context.getRequestMap().put(_APPLIED, AppliedClass.APPLIED);
+ RequestStateMap.getInstance(context).put(_APPLIED, AppliedClass.APPLIED);
}
/* (non-Javadoc)
Modified: myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/CoreRenderKit.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/CoreRenderKit.java?rev=744191&r1=744190&r2=744191&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/CoreRenderKit.java (original)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/CoreRenderKit.java Fri Feb 13 17:47:31 2009
@@ -364,7 +364,8 @@
String viewId = context.getViewRoot().getViewId();
String redirect = vh.getActionURL(context, viewId);
- ec.redirect(redirect);
+ String encodedRedirect = ec.encodeActionURL(redirect);
+ ec.redirect(encodedRedirect);
if (_LOG.isFine())
{
_LOG.fine("Page navigation to {0} happened during a PPR request " +