HttpServletResponse servletResponse = ServletActionContext.getResponse();
PortletResponse portletResponse = ((PortletServletResponse)servletResponse).getPortletResponse();
if (portletResponse instanceof ActionResponse)
{
ActionResponse actionResponse = (ActionResponse)portletResponse;
String redirectURL = actionResponse.encodeURL(url.toString());
actionResponse.sendRedirect( redirectURL );
}
else
{
log.error("Unable to redirect the portlet RenderRequest to " + url.toString());