How to Change the Session Timeout in Liferay?

To change the Session timeout in liferay for logged-in users, you have a couple of options:

  1. Override web.xml in Deployed Liferay Portal Web App:
    • Locate the web.xml file in your deployed Liferay Portal web application (usually found at LIFERAY_HOME/tomcat/webapps/WEB-INF/web.xml).
    • Update the session timeout value within the <session-config> element. For example, if you want an 8-hour session timeout, set it to 480 minutes
      <session-config>
      <session-timeout>480</session-timeout>
      </session-config>
    • Save the changes.
  2. Modify the portal-ext.properties File:
    • You can manually adjust the session timeout property by adding the following line to your portal-ext.properties file:
      session.timeout=X
      Replace X with the desired timeout value in minutes.
    • Additionally, there is a session timeout portal property that can be set in portal-ext.properties, but it’s usually overridden by the value set in web.xml.

Remember to restart your Liferay server after making any changes to apply the new session timeout settings.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

close
Thanks !

Thanks for sharing this, you are awesome !