I try create new session in one controller and set variable and get this variable from session to another action. but session return null value. I use Grails 2.3.7.
class AuthorizationController {
def signIn = {
def session = request.getSession(true)
session.setAttribute('username', 'zzzz')
println(session.getAttribute('username')) // <-- here work
redirect(action: logout)
}
def logout = {
println(session.getAttribute('username')) // <-- here not work
}
}