Error initializing the application: No such property: session for class: BootStrap

StackOverflow https://stackoverflow.com/questions/17948461

  •  04-06-2022
  •  | 
  •  

Frage

How to set user to the session in bootstrap. I am getting the error

Error initializing the application: No such property: session for class: BootStrap

In bootstrap.groovy

class BootStrap {

    def init = { servletContext ->
        session.loggedInUser = "Anantha"

    }
    def destroy = {
    }
}
War es hilfreich?

Lösung

When the bootstrap is run, there is no session. A session is generated per-user browsing the site

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top