留言板

How to obtain the very first request from user in Liferay?

thumbnail
Vitaliy Koshelenko,修改在11 年前。

How to obtain the very first request from user in Liferay?

Expert 帖子: 319 加入日期: 11-3-25 最近的帖子
Hi, all.

Does anybody know how to obtain the first request from user in Liferay?
I need something like a filter, not for all user requests, but only for the very first request. (I need to perform some custom actions - retrieving IP from request, etc.)
Please, give me some advice how to implement this.

Regards, Vitaliy.
thumbnail
David H Nebinger,修改在11 年前。

RE: How to obtain the very first request from user in Liferay?

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
Why not a LoginPostAction implementation?
thumbnail
Vitaliy Koshelenko,修改在11 年前。

RE: How to obtain the very first request from user in Liferay?

Expert 帖子: 319 加入日期: 11-3-25 最近的帖子
As I understand, LoginPostAction will be invoked after user had logged into portal, but I need to intercept the first request, when user accesses the portal page first time (at this moment he is Guest), not after logging in.
thumbnail
David H Nebinger,修改在11 年前。

RE: How to obtain the very first request from user in Liferay?

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
Then I'd do a filter. You can place a value in the session to determine if the user has been there before, and absence of the value means they're new and you can do what you want to.

To do a filter, you'll have to use the ext plugin.