留言板

Session validation on page access

Shahin Ali,修改在12 年前。

Session validation on page access

New Member 帖子: 24 加入日期: 11-5-3 最近的帖子
Using Liferay EE 6.

How can redirect to the login page if session is invalid?

Access to any page must be allowed only if the user is logged in.

Thanks.
thumbnail
Hitesh Methani,修改在12 年前。

RE: Session validation on page access

Regular Member 帖子: 171 加入日期: 10-6-24 最近的帖子
Hi Shahin,

By default liferay provides redirection and authentication for users that are not signed in.
You can simply make private pages of the community so that guest user wont be able to access them.

Thanks,
Hitesh
thumbnail
Pankaj Kathiriya,修改在12 年前。

RE: Session validation on page access

Liferay Master 帖子: 722 加入日期: 10-8-5 最近的帖子
Hi Shahin,

How can redirect to the login page if session is invalid?
>>>You can hook expire_session.jsp and make changes in expire_session.jsp to redirect user to login page.

Access to any page must be allowed only if the user is logged in.
>>>>You can remove VIEW permission of Guest Role while creating page, then User will not able to access page unless logged in.



Thanks,
Pankaj
Shahin Ali,修改在12 年前。

RE: Session validation on page access

New Member 帖子: 24 加入日期: 11-5-3 最近的帖子
Thanks folks.

Now after finding the invalid session, i am trying to forward the page to login using

"response.sendRedirect("<login page relative URL>");"

But it doesn't work. no error also. Any idea?

Thanks again