Search code examples
javaajaxliferayliferay-6

Liferay session expire even when user is doing activities on the page


I have a portlet on my page, for all the user action we are calling the resource URLs with ajax, and only the contents inside the portlet keeps changing. Now the problem is, even though the user continuously active on the page, we are getting session expired on page. Why is this happening?


Solution

  • Simple answer is because you're not actually navigating around Liferay. Using AJAX doesn't count as the user performing actions that stop their session expiring. You'll need the page to reload or extend the session time.