1

I want to call the liferay extendSession function inside every success call back. Can i write this at a one place as in overriding the success call back to first call the extendSession function and then return to execute the rest of the code written within the success call back.

Zooter
  • 79
  • 8
  • Can you give a little more detail and also show us some code you have tried to understand your question better. Thanks – Prakash K May 15 '13 at 10:16
  • This [answer](http://stackoverflow.com/questions/9509960/extend-session-of-liferay-when-performing-ajax-call) might also help you. – Prakash K May 17 '13 at 07:30

2 Answers2

2

You can use Liferay configuration to auto extend the session. Override the portal-ext.properties and put:

session.timeout.auto.extend = true
session.timeout = 5
session.timeout.warning = 1
Mark
  • 17,887
  • 13
  • 66
  • 93
0
session.timeout.auto.extend = true
session.timeout = 5
session.timeout.warning = 1

Using this mechanism will always extend liferay session and thus if browser is not closed then session will always be active.

And requirement is to extend liferay session for ajax requests.

Another possible solution is mentioned in : http://java-liferay.blogspot.in/2012/05/extending-liferays-session-by-ajax-call.html

fly2matrix
  • 2,351
  • 12
  • 13