There are already a few demos out there showing the session state preservation across redeployments in GlassFish v3, but they all use a single page, so I thought I’d create a short one using an application closer to a real-life one (i.e. using a non-trivial framework like Spring). Of course this will work across any sort of framework and Spring is not a requirement ;)
Preserving the session across redeployments is a GlassFish v3 feature while “deploy-on-save” is done by the plugin in the IDE talking to GlassFish. That and the session redeployment work equally well in NetBeans and Eclipse. IntelliJ also preserves the session across redeploys.