To increase session timeout in Liferay DXP, you need to adjust the session timeout settings in the portal-ext.properties file and the web.xml file. Here’s how you can do it:
1. Update the portal-ext.properties
file
- Navigate to the folder where your Liferay instance is installed.
- Locate the
portal-ext.properties
file. If it doesn’t exist, you can create it in the same directory whereportal-setup-wizard.properties
is located. - Add the following line to set the session timeout (in minutes). For example, to set the timeout to 60 minutes:
session.timeout=60
2. Update the web.xml
file
- Locate the
web.xml
file. This file is usually found in theWEB-INF
directory of your Liferay installation, typically at{Liferay_Home}/tomcat/webapps/ROOT/WEB-INF/web.xml
. - Open the
web.xml
file in a text editor. - Find the
<session-config>
section and set thesession-timeout
parameter. For example, to set the timeout to 60 minutes, it should look like this:
<session-config>
<session-timeout>60</session-timeout>
</session-config>
3. Restart Liferay
After making these changes, you will need to restart your Liferay server for the changes to take effect.
Example for portal-ext.properties:
# Set session timeout to 60 minutes
session.timeout=60
Example for web.xml:
<web-app>
...
<session-config>
<session-timeout>60</session-timeout>
</session-config>
...
</web-app>
By setting these parameters, you increase the session timeout to 60 minutes. Adjust the timeout value as needed for your requirements.
Make sure to back up your configuration files before making any changes.