• Post Reply Bookmark Topic Watch Topic
  • New Topic

EPractice Lab quiz 2 about HttpSessionBindingListener's valueUnbound

 
Himai Minh
Ranch Hand
Posts: 1400
8
  • 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.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!