struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alberto Gallardo <argr...@gmail.com>
Subject Re: struts2-portlet2-plugin-2.1.8.1 in Liferay 6.0.5 - Post-Redirect-Get aka Redirect after post
Date Thu, 14 Oct 2010 15:52:53 GMT
>> couldn't get the Post-Redirect-Get (PRG) working. The <result
>> type="redirectAction"> does not translate into a browser redirection.

I couldn't make this working, but...

> I've tried to debug the code, and only could find following method
> implementation, that suggest me that an http redirection
> _is_not_supported_:
>
> package org.apache.struts2.portlet.servlet;
> ...
> public class PortletServletResponse implements HttpServletResponse {
> ...
>    public void sendRedirect(String location) throws IOException {
>        throw new IllegalStateException("Not allowed in a portlet");
>    }
>
> Am I wrong?

...I found that I can redirect using this method inside an Action.execute():

   PortletActionContext.getActionResponse().sendRedirect(String location)


Regards,

Alberto Gallardo

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message