Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
biswajit sarkar
redirect method in liferay 6.1
June 6, 2012 1:22 AM
Answer

biswajit sarkar

Rank: Regular Member

Posts: 166

Join Date: October 17, 2011

Recent Posts

previously I worked in liferay 6.0.6 environment.
Now I have to convert my development environment in liferay 6.1.

In liferay 6.0.6 i used redirect method to redirect in some other page of my portal.
example ---> FacesContext fc = FacesContext.getCurrentInstance();
ExternalContext ec = fc.getExternalContext();

PortletResponse portletResponse = (PortletResponse)ec.getResponse();
LiferayPortletResponse liferayActionResponse = new LiferayPortletResponse(portletResponse);
liferayActionResponse.sendRedirect(Url);

I want to know , is that redirect method still going to work in liferay 6.1.


please help.
Alexandre FILLATRE
RE: redirect method in liferay 6.1
June 6, 2012 1:17 AM
Answer

Alexandre FILLATRE

Rank: Junior Member

Posts: 80

Join Date: December 2, 2010

Recent Posts

Hi biswajit,

If we're talking about the same method, this is part of the servlet API, not Liferay one. Thus, this should still work.
If the method you're talking about comes from Liferay API, please provide its class.

Regards,
Alexandre FILLATRE
biswajit sarkar
RE: redirect method in liferay 6.1
June 6, 2012 1:21 AM
Answer

biswajit sarkar

Rank: Regular Member

Posts: 166

Join Date: October 17, 2011

Recent Posts

sorry for the sintax it will be---->

FacesContext fc = FacesContext.getCurrentInstance();
ExternalContext ec = fc.getExternalContext();

PortletResponse portletResponse = (PortletResponse)ec.getResponse();
LiferayPortletResponse liferayActionResponse = new LiferayPortletResponse(portletResponse);
liferayActionResponse.sendRedirect(Url);
biswajit sarkar
RE: redirect method in liferay 6.1
June 6, 2012 2:19 AM
Answer

biswajit sarkar

Rank: Regular Member

Posts: 166

Join Date: October 17, 2011

Recent Posts

anyone plz help
Amit Doshi
RE: redirect method in liferay 6.1
June 7, 2012 2:41 AM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 540

Join Date: December 29, 2010

Recent Posts

Try to use this Link