Foren
Liferay 7: Ho to change the default session timeout
Thomas Kellerer, geändert vor 6 Jahren.
Liferay 7: Ho to change the default session timeout
Expert Beiträge: 490 Beitrittsdatum: 09.06.08 Neueste Beiträge
I am trying to increase the session timeout in my Liferay 7 (GA4) installation.
I added
When I check the portal properties in the control panel's "Server Administration" it still shows 30 minutes with a little hint that this property is overwritten:
Is there anything else I need to change to make this work?
I added
session.timeout=240
to my portal-ext.properties, but this is not applied (the file itself is loaded, because other properties are used)When I check the portal properties in the control panel's "Server Administration" it still shows 30 minutes with a little hint that this property is overwritten:
Is there anything else I need to change to make this work?
David H Nebinger, geändert vor 6 Jahren.
RE: Liferay 7: Ho to change the default session timeout
Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
To change session timeout you need to set in portal-ext.properties like you have but you must also edit the web.xml from the ROOT/WEB-INF folder.
Come meet me at Devcon 2017 or 2017 LSNA!
Come meet me at Devcon 2017 or 2017 LSNA!
Thomas Kellerer, geändert vor 6 Jahren.
RE: Liferay 7: Ho to change the default session timeout
Expert Beiträge: 490 Beitrittsdatum: 09.06.08 Neueste BeiträgeDavid H Nebinger:
To change session timeout you need to set in portal-ext.properties like you have but you must also edit the web.xml from the ROOT/WEB-INF folder.
Thanks that did the trick.
But what is the use of the property in portal-ext.properties then?
Olaf Kock, geändert vor 6 Jahren.
RE: Liferay 7: Ho to change the default session timeout
Liferay Legend Beiträge: 6403 Beitrittsdatum: 23.09.08 Neueste BeiträgeThomas Kellerer:
Thanks that did the trick.
But what is the use of the property in portal-ext.properties then?
The application server is timing out the session, all by itself. Liferay has this nifty JS running that is warning you about a soon-to-expire session. I'm not sure if it can't read the session timeout from the servlet context, or if it just couldn't do so in a past release of the servlet spec. This is what the property is about: When should Liferay warn you about the upcoming timeout (or extend the session explicitly through JS if you configured it to do so - check the property session.timeout.auto.extend
Mayur Patel, geändert vor 6 Jahren.
RE: Liferay 7: Ho to change the default session timeout
Expert Beiträge: 358 Beitrittsdatum: 17.11.10 Neueste Beiträge
Agree ! You need to update the web.xml file inside ROOT to get an effect.
Thanks !
<session-config>
<session-timeout>30</session-timeout>
<cookie-config>
<http-only>true</http-only>
</cookie-config>
</session-config>
Thanks !