Avoid user login after every session timeout

Issue

  • On every session expire it is asking for user login again

Environment

  • Liferay 7.0

Resolution

  • Login after each session timeout is the default functionality of the Liferay portal.
  • In order to avoid login after every session timeout, need to modify the session.timeout property through portal-ext.properties file and comment out the entry of the session.timeout property if it is set in the properties file. 
Set the following property in portal-ext.properties:
session.timeout.auto.extend=true
  • Specify the number of minutes before a session expires. This value is always overridden by the value set in web.xml.
 <!-- ==================== Default Session Configuration ================= -->
<!-- You can set the default session timeout (in minutes) for all newly -->
<!-- created sessions by modifying the value below. -->
<session-config>
<session-timeout>5</session-timeout>
</session-config>
  • Set the auto-extend mode to true to avoid having to ask the user whether to extend the session or not. Instead, it will be automatically extended. The purpose of this mode is to keep the session open as long as the user's browser is open with a portal page loaded. It would be better to use a smaller "session.timeout", such as 5 minutes, for better performance.       

 

 

 

 

Was this article helpful?
0 out of 0 found this helpful