• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

javaranch mock: session listener

 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Question Bank ID : 23(Choose the 1 correct answer)
A class that will recieve notification if an Attribute is added to or removed from a session will implement which interface?
1.HttpSessionAttributeListener
2.HttpSessionListener
3.HttpSessionBindingListener
4.HttpSessionObjectListener
Correct Answer (reported) was: 1
Issues with this question & reported answer:
1. It should have been HttpSessionAttributesListener
2. HttpSessionBindingListener also would have received a notification (valueBound/valueUnbound) when an attribute is added or removed
Any ideas?
Rama
[ November 22, 2002: Message edited by: Rama Raghavan ]
 
Ranch Hand
Posts: 647
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Rama Raghavan:
Question Bank ID : 23(Choose the 1 correct answer)
A class that will recieve notification if an Attribute is added to or removed from a session will implement which interface?
1.HttpSessionAttributeListener
2.HttpSessionListener
3.HttpSessionBindingListener
4.HttpSessionObjectListener
Correct Answer (reported) was: 1
Issues with this question & reported answer:
1. It should have been HttpSessionAttributesListener
2. HttpSessionBindingListener also would have received a notification (valueBound/valueUnbound) when an attribute is added or removed
Any ideas?
Rama
[ November 22, 2002: Message edited by: Rama Raghavan ]


Hi Rama ,
It should be HttpSessionAttributeListener.Check out the API specification to clear the doubt.
The question asks "The Class" and not "the object" which should receive the notification if an attribute is added or removed from a session so the correct ans is HttpSessionAttributeListener and not HttpSessionBindingListener where the object receives the notification.
Hope this clears your doubt.
Trupti
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic