Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
piyush liferay
How to Manage Session in liferay ??
January 24, 2013 9:42 PM
Answer

piyush liferay

Rank: Junior Member

Posts: 40

Join Date: January 1, 2013

Recent Posts

Can anybody tell me about the session management in liferay..

i am working on login - logout functionality so i am required such functionality so suggest me ....
Subhash Pavuskar
RE: How to Manage Session in liferay ??
January 24, 2013 10:58 PM
Answer

Subhash Pavuskar

Rank: Regular Member

Posts: 216

Join Date: March 12, 2012

Recent Posts

Hi,

Pls refer this link !! hope it may help you Click here
piyush liferay
RE: How to Manage Session in liferay ??
January 25, 2013 3:41 AM
Answer

piyush liferay

Rank: Junior Member

Posts: 40

Join Date: January 1, 2013

Recent Posts

but in this example doesn't show , how to destroy a session when logout from the page....
Apoorva Prakash
RE: How to Manage Session in liferay ??
January 25, 2013 6:14 AM
Answer

Apoorva Prakash

Rank: Liferay Master

Posts: 658

Join Date: June 15, 2010

Recent Posts

piyush liferay:
but in this example doesn't show , how to destroy a session when logout from the page....


Hi Piyush,

Basically, the following code is the key portion of logoutAction:

1try {
2    session.invalidate();
3}catch (Exception e) {
4    //ignored
5}


Apart form this,3 cookies COMPANY_ID, ID and PASSWORD are also destroyed. You can see the exact Logout code here.

Hope This will help...

Thanks and Regards,
Apoorva Prakash