Win a copy of Spark in Action this week in the Open Source Projects 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

EPractice Lab quiz 2 about HttpSessionBindingListener's valueUnbound

 
Ranch Foreman
Posts: 1922
13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Which interface must a class implement so that instances of the class are notified after any object is removed from a session?

a. javax.servlet.http.HttpSessionAttributeListener
b. javax.servlet.http.HttpSessionListener
c. javax.servlet.http.HttpAttributeSessionListener
d. javax.servlet.http.HttpSessionBindingListener

Choice A is correct
HttpSessionAttributeListener listener interface can be implemented in order to get notifications of changes to the attribute lists of sessions within this web application.



I think D can be the option. When an object ,which implements HttpSessionBindingListener, is removed from the attribute list of a session, valueUnbound() is called.
 
Acetylsalicylic acid is aspirin. This could be handy too:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic