• Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlet listeners-HttpSessionListener and HttpSessionAttributeListener  RSS feed

 
Mallika R Kumar
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I have a question regarding a Listener class that implements both HttpSessionListener and HttpSessionAttributeListener interfaces.

HttpSessionListener - listens to sessionCreated and sessionDestroyed events.
HttpSessionAttributeListener - listens when attributes are added, removed or replaced in the session.

When a session is destroyed, I thought attributes are removed from it. So, does sessionDestroyed event internally kick off attributeRemoved event ?

Thanks,
Mallika.
 
Bosun Bello
Ranch Hand
Posts: 1512
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The session attrbute listener will be notified before the session is destroyed.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!