Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EPractice Lab quiz 2 about HttpSessionBindingListener's valueUnbound

Himai Minh
Ranch Hand
Posts: 1359
  • 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.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic