Fórumok
First portlet problem : actionURL always redirect to view.jsp
Owen James, módosítva 12 év-val korábban
First portlet problem : actionURL always redirect to view.jsp
New Member Bejegyzések: 3 Csatlakozás dátuma: 2011.09.27. Legújabb bejegyzések
Hi !
I'm a new Liferay developer and i start with the portlet sample in the Liferay's Developer 6 Guide.
The sample is about dealing with a greeting message which can be edited in a edit.jsp file and displayed in a view.jsp. In the edit.jsp i have a portlet:actionURL which is the action of a form.
When the edit form is updated, there is a success message displayed using liferay-ui:success.
When i submit the form, i'm always redirected to the view.jsp with the greeting message updated ! I don't have the same behavior like in the Guide.
Anyone have an idea ?
Thanks in advance,
I'm a new Liferay developer and i start with the portlet sample in the Liferay's Developer 6 Guide.
The sample is about dealing with a greeting message which can be edited in a edit.jsp file and displayed in a view.jsp. In the edit.jsp i have a portlet:actionURL which is the action of a form.
When the edit form is updated, there is a success message displayed using liferay-ui:success.
When i submit the form, i'm always redirected to the view.jsp with the greeting message updated ! I don't have the same behavior like in the Guide.
Anyone have an idea ?
Thanks in advance,
Sandeep Nair, módosítva 12 év-val korábban
RE: First portlet problem : actionURL always redirect to view.jsp
Liferay Legend Bejegyzések: 1744 Csatlakozás dátuma: 2008.11.06. Legújabb bejegyzések
Can you attach your portlet zip file.
Regards,
Sandeep
Regards,
Sandeep
Owen James, módosítva 12 év-val korábban
RE: First portlet problem : actionURL always redirect to view.jsp
New Member Bejegyzések: 3 Csatlakozás dátuma: 2011.09.27. Legújabb bejegyzésekSandeep Nair:
Can you attach your portlet zip file.
Regards,
Sandeep
Hi !
Please, find attached a zip containing the eclipse project.
Thanks in advance.
Mellékletek:
Sandeep Nair, módosítva 12 év-val korábban
RE: First portlet problem : actionURL always redirect to view.jsp
Liferay Legend Bejegyzések: 1744 Csatlakozás dátuma: 2008.11.06. Legújabb bejegyzések
Hi Owen,
I downloaded the zip and extracted it, but there is nothing in it except .project, .classpath and build.xml
Regards,
Sandeep
I downloaded the zip and extracted it, but there is nothing in it except .project, .classpath and build.xml
Regards,
Sandeep
Samir Gami, módosítva 12 év-val korábban
RE: First portlet problem : actionURL always redirect to view.jsp
Regular Member Bejegyzések: 162 Csatlakozás dátuma: 2011.02.04. Legújabb bejegyzések
Have you change the <portlet-class> to point your own class in portlet.xml ?
Gaurav K Barot, módosítva 12 év-val korábban
RE: First portlet problem : actionURL always redirect to view.jsp
Junior Member Bejegyzések: 44 Csatlakozás dátuma: 2008.11.28. Legújabb bejegyzésekOwen James:
!
I'm a new Liferay developer and i start with the portlet sample in the Liferay's Developer 6 Guide.
The sample is about dealing with a greeting message which can be edited in a edit.jsp file and displayed in a view.jsp. In the edit.jsp i have a portlet:actionURL which is the action of a form.
When the edit form is updated, there is a success message displayed using liferay-ui:success.
When i submit the form, i'm always redirected to the view.jsp with the greeting message updated ! I don't have the same behavior like in the Guide.
Anyone have an idea ?
Thanks in advance,
Hi Owen,
When you generate actionURL in the edit.jsp it sends the control to processAction (actionReq, actionRes) method of the portlet class. Can you check if you have used dispatcher to dispatch the control to view? If you set the portlet mode to VIEW from processAction( ) then it may go to doView() method and the dispatcher will dispatch it to view.jsp based on the init params you have set in your portlet.xml file.
- Gaurav
Jose Miguel Loor, módosítva 10 év-val korábban
RE: First portlet problem : actionURL always redirect to view.jsp
New Member Bejegyzések: 11 Csatlakozás dátuma: 2013.11.27. Legújabb bejegyzések
I am having the same problem
How did you solve it ?
How did you solve it ?
Sagar A Vyas, módosítva 10 év-val korábban
RE: First portlet problem : actionURL always redirect to view.jsp
Liferay Master Bejegyzések: 679 Csatlakozás dátuma: 2009.04.17. Legújabb bejegyzések
Jose,
Give me you portlet jsp file where you are trying to redirect it ? or Portlet zip file.
Thanks,
Sagar Vyas
Give me you portlet jsp file where you are trying to redirect it ? or Portlet zip file.
Thanks,
Sagar Vyas
meera prince, módosítva 10 év-val korábban
RE: First portlet problem : actionURL always redirect to view.jsp
Liferay Legend Bejegyzések: 1111 Csatlakozás dátuma: 2011.02.08. Legújabb bejegyzések
Hi
In portlet default view is always view.jsp because that will be configured in your portlet.xml file as init parameter
When ever we perform action using action url after completing action then it will render view,jsp page.
Here in the portlet action method we need use response.setRenderParameter("jspPage","html/edit.jsp") then after submit the form again it will render edit.jsp page.
Have a look into folloing article for more information it will help you more.
http://www.liferaysavvy.com/2014/04/jsr-168-standards-portlet-development.html
Regards,
meera price
In portlet default view is always view.jsp because that will be configured in your portlet.xml file as init parameter
When ever we perform action using action url after completing action then it will render view,jsp page.
Here in the portlet action method we need use response.setRenderParameter("jspPage","html/edit.jsp") then after submit the form again it will render edit.jsp page.
Have a look into folloing article for more information it will help you more.
http://www.liferaysavvy.com/2014/04/jsr-168-standards-portlet-development.html
Regards,
meera price
Marco Azzalini, módosítva 7 év-val korábban
RE: First portlet problem : actionURL always redirect to view.jsp
Regular Member Bejegyzések: 146 Csatlakozás dátuma: 2014.11.18. Legújabb bejegyzésekMeera Prince:
Hi
Here in the portlet action method we need use response.setRenderParameter("jspPage","html/edit.jsp") then after submit the form again it will render edit.jsp page.
I add this note just to help someone else... the Meera's suggestion is correct (as usual) but the jsp path has to be absolute, not relative, so it should be: /html/edit.jsp.
Using relative path I was getting always this error:
is not a valid include
and it took me a while before I figure out where was the problem regards,
Marco