How to configure a session timeout for Grails application?

Posted by curd0 on Stack Overflow See other posts from Stack Overflow or by curd0
Published on 2010-05-25T18:45:47Z Indexed on 2010/05/25 18:51 UTC
Read the original article Hit count: 607

In one of controllers in my Grails application I'm preserving a parameter value in a session variable like this:

    session.myVariable = params.myValue

After that, I can access the saved value from different controllers/GSP-pages as long as I actively use the app. However, if I don't use my app for a while, even though my browser window is still open, the session variable looses it's value.

Does this happens because the session expires? I was under impression that a session lives until the browser window is still open, but apparently I was wrong.

What should I do to ensure all session variables I define in my Grails app don't expire until the browser is closed? Is there any way to set session timeout manually?

Thank you in advance for your answers!

© Stack Overflow or respective owner

Related posts about session

Related posts about grails