Liferay redirect to user's entered page post login

569 views Asked by At

I have created a custom landing page hook in Liferay6.2.

Suppose user enters abc.com/xyz. Then after login he should not be redirected to my custom landing page. Instead he should be redirected to xyz post login.

My landing page should be selected only when he enters abc.com How to implement this.

1

There are 1 answers

0
Dhruv Pandey On BEST ANSWER

This can be fetched using below code in your PostLogin Hook

LastPath lastPath = (LastPath) session.getAttribute(WebKeys.LAST_PATH);