Fórum

Spring portlet MVC and liferay : redirect to a specific portlet page

thumbnail
Francois Fournel, modificado 12 Anos atrás.

Spring portlet MVC and liferay : redirect to a specific portlet page

Junior Member Postagens: 99 Data de Entrada: 15/04/10 Postagens Recentes
Hello,

I am stuck into a technical problem mixing spring portlet MVC and liferay.
I have a JSP page displayed in the navigator and when I click on a button, I want to redirect the user to another portlet at a specific page (not the landing one when we deploy the portlet for the first time).
I don't know how to contruct the redirection URL (which allows to go from portlet A to portlet B at portlet B's specific page).

Can you help me on that point please.

Thank you.

PS : for the moment I use spring portlet MVC with liferay 606 CE. I use annotations with @RenderRequest to display a JSP page. So I need to call a specific @RenderRequest annotated method to display my specific JSP page.
thumbnail
Jonas Yuan, modificado 12 Anos atrás.

RE: Spring portlet MVC and liferay : redirect to a specific portlet page

Liferay Master Postagens: 993 Data de Entrada: 27/04/07 Postagens Recentes
Hi Francois Fournel,

It would be better that you could leverage Liferay Friendly URL framework.

Thanks

Jonas Yuan
thumbnail
Francois Fournel, modificado 12 Anos atrás.

RE: Spring portlet MVC and liferay : redirect to a specific portlet page

Junior Member Postagens: 99 Data de Entrada: 15/04/10 Postagens Recentes
Thank you for your answer.
Do you mean I need to get rid of Spring MVC annotation ?
I'am too far in the project to go for another framework emoticon.
I would like just the solution for spring mvc, the problem comes again today.
I definitely must find a solution for this ! emoticon

EDIT : I insist in the fact I want to redirect to a PORTLET specific page (not a liferay specific page (=url adress in the navigator))
thumbnail
Steffen Schuler, modificado 12 Anos atrás.

RE: Spring portlet MVC and liferay : redirect to a specific portlet page

Regular Member Postagens: 137 Data de Entrada: 12/05/08 Postagens Recentes
I recommend friendly URLs too... it is just simpler.


within you JSP you can e.g. define a link like:

<portlet:actionURL var="redirectURL" name="redirectAction"/>
<a href="<%= redirectURL.toString() %>" name="redirect">go to my page via a redirection</a>


within you SpringMVCPortlet

@ActionMapping(value="com.javax.portlet.Action=redirectAction")
public void redirectAction(ActionRequest req, ActionResponse res){
res.redirect("/somewhere/mypage")
}



If you want to redirect according to a specific parameter, you can add a parameter to the portlet:actionURL and extract in you Action method...
Manish Devraj, modificado 12 Anos atrás.

RE: Spring portlet MVC and liferay : redirect to a specific portlet page

New Member Mensagem: 1 Data de Entrada: 04/01/12 Postagens Recentes
I am having similar issue. I am creating portlet with Spring MVC that will load multiple views from Spring within same portlet. I have used Liferay navigation (navigation.vm) to create application level menu. Now I want to call specific page of portlet from menu. Say I have User information and Product information pages developed using Spring. Now I can create sub level of menu as "Users" and "Products" which shall redirect to these pages.

As this is not happening using code I need to know my portlet URL and URL of pages that gets loaded so I can call them to point to actual URLs using some friendly URL.

Can you please help me achieve this
thumbnail
Tejas Patel, modificado 11 Anos atrás.

RE: Spring portlet MVC and liferay : redirect to a specific portlet page

Junior Member Postagens: 71 Data de Entrada: 24/01/12 Postagens Recentes
Hello Francois,

Do you get the solution of your problem?
If yes, then please share it because I have same problem using springMVC.

Thanks,
Tejas patel