Search code examples
grailsjsessionid

Grails without session


I noticed that grails applications, as most other java based web applications, always creates a session, even when it is not used.

Is it possible to set the JSESSIONID cookie only when needed, eg. when someone tries to log in?


Solution

  • The generation of a session cookie can be disabled by adding the following page directive:

    <%@ page session="false" %>