简体   繁体   中英

Liferay: Display the visitor's count

I trying to show the visitor's count on home page by creating on portlet for it.Here i am trying to use the session concept. After session expiration ,if the user relogin then the count should increases.

Q1: Can any one tell me how i can get the session id on the portlet because as per my knowledge we cannot cross the servlet session boundary. The login pre action is going to run within the ROOT servlet session and the portlet, deployed as a separate WAR file, has a separate servlet session.

Q2: Also are these session id are unique each time they created?

Also please guide me how i can do this ? Also share some doc ref for more understanding...

LiveUsers.getSessionUsers(company.getCompanyId())

This should allow you to retrieve user sessions for connected users. Hope it helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM