Given a sessionid, is it possible to retrieve that information from wherever the session data is stored, or do I have to store the information I want in a database, and retrieve based on the sessionid?
views:
22answers:
1
A:
In earlier version of the servlet spec there was a way to get all sessions but it was removed as a security risk. You can register an implementation of HttpSessionListener in web.xml (run grails install-templates
and edit src/templates/war/web.xml to register it) and keep track of sessions that way.
The App-Info plugin has this as a feature (among others). It's disabled by default but easily enabled by adding grails.plugins.appinfo.useContextListener = true
to grails-app/conf/Config.groovy
Burt Beckwith
2010-09-12 21:22:59