Foros de discusión

Am getting session timout pop when I am active in the portal page

Liferay User, modificado hace 6 años.

Am getting session timout pop when I am active in the portal page

New Member Mensajes: 15 Fecha de incorporación: 5/01/15 Mensajes recientes
Hi,
I have set session time out to 10 minutes in tomcat/webapps/root/webinf/web.xml , tomcat/conf/web.xml
<session-config>
<session-timeout>10</session-timeout>
</session-config>
and in portal-ext.properties
session.timeout =10
But I am getting session timout pop when I am actively working the in the Portal.

I am using JSF portlets.

Can anyone help on this.

Archivos adjuntos:

thumbnail
Neil Griffin, modificado hace 6 años.

RE: Am getting session timout pop when I am active in the portal page

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
You can try calling Liferay.Session.extend() via JavaScript. For more information, see the thread titled Liferay Session Extend using Primefaces.
Liferay User, modificado hace 6 años.

RE: Am getting session timout pop when I am active in the portal page

New Member Mensajes: 15 Fecha de incorporación: 5/01/15 Mensajes recientes
Thank you Neil for the solution.

I have included Liferay.session.extend() in my xhtml but it doesn't seem to be working. Still I am getting Liferay session timeout pop after 10 minutes.

I tried adding session.timeout.auto.extend=true in portal-ext.properties
But when I did this, even after 10 minutes of idle time, I am not getting session timeout popup. Is that the right behaviour ?

Please suggest...
thumbnail
Suresh Nimmakayala, modificado hace 6 años.

RE: Am getting session timout pop when I am active in the portal page

Liferay Master Mensajes: 690 Fecha de incorporación: 18/08/04 Mensajes recientes
# 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
# browser is open and with a portal page loaded. It is recommended to use
# this setting along with a smaller "session.timeout", such as 5 minutes for
# better performance.
Liferay User, modificado hace 6 años.

RE: Am getting session timout pop when I am active in the portal page

New Member Mensajes: 15 Fecha de incorporación: 5/01/15 Mensajes recientes
I have included below code in portal-ext.properties
session.timeout.warning=1
session.timeout.auto.extend=true
session.timeout.redirect.on.expire=true
session.timeout=2


How long the session will be auto extended if I have set session timeout as 2 minutes.

After including auto.extend= true, it looks like the session is not getting expired at all even If I am not active in Portal.
thumbnail
Suresh Nimmakayala, modificado hace 6 años.

RE: Am getting session timout pop when I am active in the portal page

Liferay Master Mensajes: 690 Fecha de incorporación: 18/08/04 Mensajes recientes
session auto extends,
did you mentioned
session.timeout.redirectUrl=????
Liferay User, modificado hace 6 años.

RE: Am getting session timout pop when I am active in the portal page

New Member Mensajes: 15 Fecha de incorporación: 5/01/15 Mensajes recientes
Yes I have included
session.timeout.redirectUrl=/web/guest/home
in portal-ext.properties.

Note : I wanted the session to be extended only when I am active in the portal. If my application is idle for 10 minutes I wanted the page to be logged out and the session should be timed out.


Thanks
thumbnail
Suresh Nimmakayala, modificado hace 6 años.

RE: Am getting session timout pop when I am active in the portal page

Liferay Master Mensajes: 690 Fecha de incorporación: 18/08/04 Mensajes recientes
if you are active you don't get extended message, you don't need

as per requirement i guess you don't need auto extend make it false
Liferay User, modificado hace 6 años.

RE: Am getting session timout pop when I am active in the portal page

New Member Mensajes: 15 Fecha de incorporación: 5/01/15 Mensajes recientes
The problem of making auto.extend=false is, even If i am actively working on the Portal page, I am getting Session Timeout warning.
Like If I am viewing the portal page, clicking on the popups(AJAX calls) etc I am getting the session timeout error.

In short I am getting session timeout if there is no interaction with the server. I need a solution for this.

I am not sure If I have explained my issue clearly.