Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Listener Question

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can somebody explain me the difference between
HttpSessionBindingListener and HttpSessionAttributeListener

1. Do they differ only by the object type they handle ?

2. Is there any order in which the listeners are invoked when a session
is being invalidated or being destroyed ?

Thanks
SP
 
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An object of the class that implements HttpSessionBindingListener interface will be informed when it is added/deleted (bound/unBound) from the session.

An object of the class that implements HttpSessionAttributeListener interface will be informed whether an attribute has been added/removed/replaced from the session.

HttpSessionBindingListener will be invoked before HttpSessionAttributeListener when an Object is bound/unBound from the session.
[ October 05, 2005: Message edited by: vishnu prakash ]
 
Sethu Prem
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the explanation.
 
Always! Wait. Never. Shut up. Look at this tiny ad.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic