Re: struts2-portlet2-plugin-2.1.8.1 in Liferay 6.0.5 - Post-Redirect-Get aka Redirect after post
iN LIFERAY6.0.6 tO SOLVE DUPLICATE FORM SUBMISSION u HAVE TO JUST DO action-url-redirecttrue/action-url-redirect IN liferay-display.xml -- View this message in context: http://struts.1045723.n5.nabble.com/struts2-portlet2-plugin-2-1-8-1-in-Liferay-6-0-5-Post-Redirect-Get-aka-Redirect-after-post-tp3436007p4781220.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts2-portlet2-plugin-2.1.8.1 in Liferay 6.0.5 -Post-Redirect-Get aka Redirect after post
Hello, I have migrated a portlet application from Lifray 5.2.2 to Liferay 5.2.3 and I got the same problem. Does anybody have a solution for version 5.2.3 ? Thanks in advance! Galina - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts2-portlet2-plugin-2.1.8.1 in Liferay 6.0.5 -Post-Redirect-Get aka Redirect after post
Did you set the action-url-redirect value to true in liferay-portlet.xml as described in the mentioned Lifray bug-report (http://issues.liferay.com/browse/LEP-1487)? Nils-H On Mon, Dec 20, 2010 at 1:22 PM, Galina Angelova galb...@yahoo.com wrote: Hello, I have migrated a portlet application from Lifray 5.2.2 to Liferay 5.2.3 and I got the same problem. Does anybody have a solution for version 5.2.3 ? Thanks in advance! Galina - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts2-portlet2-plugin-2.1.8.1 in Liferay 6.0.5 -Post-Redirect-Get aka Redirect after post
Yes. When i set it to true, I get the following error: Not Found The requested resource was not found. http://cruises-tcb-temp-tomcat.tcit.be/c/portal/layout?p_l_id=3p_p_id=AdminShipPortlet_WAR_cruisesadminp_p_lifecycle=0_AdminShipPortlet_WAR_cruisesadmin__AdminShipPortlet_WAR_cruisesadmin_struts.portlet.action=%2Fship%2FrenderDirect_AdminShipPortlet_WAR_cruisesadmin__AdminShipPortlet_WAR_cruisesadmin_struts.portlet.mode=view_AdminShipPortlet_WAR_cruisesadmin__AdminShipPortlet_WAR_cruisesadmin_struts.portlet.eventAction=true If I set it to false, I get this error: The requested resource (/cruises-admin/cruise/editCriterion) is not available - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts2-portlet2-plugin-2.1.8.1 in Liferay 6.0.5 -Post-Redirect-Get aka Redirect after post
My experience make portlet the ioc inside s2 conflicted with spring inside liferay Perm mem eror show Not that I have long experience with liferay, but up to now, I have had no problems. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts2-portlet2-plugin-2.1.8.1 in Liferay 6.0.5 -Post-Redirect-Get aka Redirect after post
would u share the code how ur spring connect to the persistance, do u create ur own session factory for hibernate, or u can use the sessionfactory inside liferay but my experience see that our struts and liferay are in different war F On Sat, Oct 16, 2010 at 1:26 AM, Alberto Gallardo argr...@gmail.com wrote: My experience make portlet the ioc inside s2 conflicted with spring inside liferay Perm mem eror show Not that I have long experience with liferay, but up to now, I have had no problems. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts2-portlet2-plugin-2.1.8.1 in Liferay 6.0.5 - Post-Redirect-Get aka Redirect after post
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-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts2-portlet2-plugin-2.1.8.1 in Liferay 6.0.5 - Post-Redirect-Get aka Redirect after post
Hi, Have you looked at the portlet sample app? It has a few portlet PRG examples. Try deploying it in Liferay and see if it works as expected. Nils-H On Thu, Oct 14, 2010 at 5:52 PM, Alberto Gallardo argr...@gmail.com wrote: 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-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts2-portlet2-plugin-2.1.8.1 in Liferay 6.0.5 - Post-Redirect-Get aka Redirect after post
Hi, Have you looked at the portlet sample app? It has a few portlet PRG examples. Try deploying it in Liferay and see if it works as expected. I guess you mean the portlet sample in https://cwiki.apache.org/confluence/display/WW/Struts+2+Portlet+Tutorial Yes, I tried it and tried to debug the portlet and struts2 code; but after a few hours I gave up: As I already mentioned, the PRG works using the PortletActionContext.getActionResponse().sendRedirect() method call inside an Action.execute. In any case, thanks for your answer. Alberto - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts2-portlet2-plugin-2.1.8.1 in Liferay 6.0.5 - Post-Redirect-Get aka Redirect after post
I believe it is up to the container how the event - render transition is implemented. I don't think there's any guarantee that it's actualy a redirect. If you have several portlets on the page, you could check that the transition is ok by clicking on a an action/link in a different portlet, and see that only the render phase is executed in your struts2 portlet. Nils-H On Thu, Oct 14, 2010 at 6:11 PM, Alberto Gallardo argr...@gmail.com wrote: Hi, Have you looked at the portlet sample app? It has a few portlet PRG examples. Try deploying it in Liferay and see if it works as expected. I guess you mean the portlet sample in https://cwiki.apache.org/confluence/display/WW/Struts+2+Portlet+Tutorial Yes, I tried it and tried to debug the portlet and struts2 code; but after a few hours I gave up: As I already mentioned, the PRG works using the PortletActionContext.getActionResponse().sendRedirect() method call inside an Action.execute. In any case, thanks for your answer. Alberto - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts2-portlet2-plugin-2.1.8.1 in Liferay 6.0.5 - Post-Redirect-Get aka Redirect after post
Maybe this is related (although old): http://issues.liferay.com/browse/LEP-1487 Nils-H On Thu, Oct 14, 2010 at 6:25 PM, Nils-Helge Garli Hegvik nil...@gmail.com wrote: I believe it is up to the container how the event - render transition is implemented. I don't think there's any guarantee that it's actualy a redirect. If you have several portlets on the page, you could check that the transition is ok by clicking on a an action/link in a different portlet, and see that only the render phase is executed in your struts2 portlet. Nils-H On Thu, Oct 14, 2010 at 6:11 PM, Alberto Gallardo argr...@gmail.com wrote: Hi, Have you looked at the portlet sample app? It has a few portlet PRG examples. Try deploying it in Liferay and see if it works as expected. I guess you mean the portlet sample in https://cwiki.apache.org/confluence/display/WW/Struts+2+Portlet+Tutorial Yes, I tried it and tried to debug the portlet and struts2 code; but after a few hours I gave up: As I already mentioned, the PRG works using the PortletActionContext.getActionResponse().sendRedirect() method call inside an Action.execute. In any case, thanks for your answer. Alberto - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts2-portlet2-plugin-2.1.8.1 in Liferay 6.0.5 - Post-Redirect-Get aka Redirect after post
Maybe this is related (although old): http://issues.liferay.com/browse/LEP-1487 Thanks a lot! This is exactly what I was looking for. Now it works like a charm! :-) By the way, my solution did not work. I was now facing the next problem with the ActionResponse.redirect() in ActionSupport.execute(): an StateAwareResponseImpl.setRenderParameter() was being called before the redirect(), and struts threw an IllegalStateException! Using the suggested action-url-redirecttrue/action-url-redirect solves the problem. Alberto - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts2-portlet2-plugin-2.1.8.1 in Liferay 6.0.5 -Post-Redirect-Get aka Redirect after post
My experience make portlet the ioc inside s2 conflicted with spring inside liferay Perm mem eror show Any idea all? /m/ -Original Message- From: Alberto Gallardo argr...@gmail.com Date: Thu, 14 Oct 2010 19:00:01 To: Struts Users Mailing Listuser@struts.apache.org Reply-To: Struts Users Mailing List user@struts.apache.org Subject: Re: struts2-portlet2-plugin-2.1.8.1 in Liferay 6.0.5 - Post-Redirect-Get aka Redirect after post Maybe this is related (although old): http://issues.liferay.com/browse/LEP-1487 Thanks a lot! This is exactly what I was looking for. Now it works like a charm! :-) By the way, my solution did not work. I was now facing the next problem with the ActionResponse.redirect() in ActionSupport.execute(): an StateAwareResponseImpl.setRenderParameter() was being called before the redirect(), and struts threw an IllegalStateException! Using the suggested action-url-redirecttrue/action-url-redirect solves the problem. Alberto - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts2-portlet2-plugin-2.1.8.1 in Liferay 6.0.5 - Post-Redirect-Get aka Redirect after post
couldn't get the Post-Redirect-Get (PRG) working. The result type=redirectAction does not translate into a browser redirection. 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? Best regards - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org