• 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

question about HttpSessionBindingListener interface

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which statements are correct about object implementing Which statements are correct about object implementing HttpSessionBindingListener interface?
1) valueBound method will be called before the object is accessible through getAttribute method
2) valueBound method will be called after the object is accessible through getAttribute method
3) valueUnbound method will be called before the object is removed from the session
4) valueUnbound method will be called after the object is removed from the session
 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1 & 4 are the answer
 
jeffrey z. lee
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know why answer 1 is correct.
when the object with the implementation of HttpSessionBindingListener is being bound to a session,the valueBound method of the object is called .why is valueBound method called when the object is accessed ?
please help me, thanks
 
Raj Paul
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please see the phrase
valueBound method will be called before the object is accessible through getAttribute method
valueBound method will be called, before the getAttribute method.. The sequence has been said here.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic