掲示板

Session Expires in ajax calls

6年前 に Raghu teja によって更新されました。

Session Expires in ajax calls

Junior Member 投稿: 61 参加年月日: 11/03/10 最新の投稿
Hi Team,

In our portlet , we have only the ajax calls.

User is active in the page and doing some search(using ajax ). After Sometime, we are getting a session warning message and getting session timeout.

I am not Sure why it. User is active and doing some actions.

Is anyone faced this issue?
thumbnail
6年前 に David H Nebinger によって更新されました。

RE: Session Expires in ajax calls

Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
When you issue an ajax call, include a call to Liferay.Session.extend().

This will invoke the appropriate stuff in the browser and in the backend to keep the session alive.
6年前 に Raghu teja によって更新されました。

RE: Session Expires in ajax calls

Junior Member 投稿: 61 参加年月日: 11/03/10 最新の投稿
Thanks , i will try and let you know.
6年前 に Raghu teja によって更新されました。

RE: Session Expires in ajax calls

Junior Member 投稿: 61 参加年月日: 11/03/10 最新の投稿
It's working. Just by adding the single line.

Thanks.
thumbnail
6年前 に David H Nebinger によって更新されました。

RE: Session Expires in ajax calls

Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
I don't know how frequently you're making your AJAX calls, but you need to do the Liferay.Session.extend() call before the session expires, so if you're not making ajax calls within that timeframe you might want to schedule something to do it for you.