I deployed this app in tomcat web server. According to my understanding i should able to see the print statements in listener class either in console or logs when it gets invoked. Please correct me if i'm wrong. I could see only servlet print statements on console but not listener's. Any enlightenment is much helpful.
Are you actually seeing those attributes when the sessionDestroyed method is called?
I have been under the impression that you can't rely on session contents still being there when sessionDestroyed is called.
PS: AHA - I get to answer my own question. Prior to servlet API 2.4 the state was undefined. API 2.3 definitively states that sessionDestroyed is called before the session is invalidated. I think I got bit by this years ago with an early Tomcat version.