Pages

Thursday 12 April 2012

Maintaing Login Session attributes usingproperties file

There are few attributes which comes out handy when dealing with session inside the Liferay portal.These attributes has to be configured in portal-ext.properties.

(i) If you want to specify the minutes after which the session should expire, use
   
session.timeout=30
    This value is always overridden by the the value set in deployment descriptor(web.xml)
    
<session-config>
              <session-timeout>35</session-timeout>
      </session-config>


(ii) To specify the number of minutes before a warning is sent to the user informing the user of the session expiration, use
   
session.timeout.warning=2
    Setting this attribute value to
0 disables any warning message

(iii) To auto-extend the session, one can use the following attribute. Setting false will not auto-extend the session
   
session.timeout.auto.extend=true

(iv) To redirect the user to the default page, when the session expires
   
session.timeout.redirect.on.expire=true

(v) To keep the same session shared between guest and user, use
   
session.enable.phishing.protection=false
    Setting this value to true will invalidate the session when the user logs into the portal.

No comments:

Post a Comment