• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session Listener

 
Niala Nirell
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

On page 264 of Head First Servlet & JSP (2nd edition) for HttpSessionActivationListener it is said that it is usually implemented by An attribute class and Some other class

page 263 there is an example of HttpSessionActivationListener implemented by an attribute class. What could be an example with some other class?

Is there any typo problem? should An attribute class and Some other class both checked?

Thank you
 
Niala Nirell
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another question.

do I need to configure the DD to use a HttpSessionActivationListener?
 
Remko Strating
Ranch Hand
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There was a lot of discussion over it, but the answer is no.

In the following link you can read over the discussion

Is HttpSessionActivationListener configured in DD?
 
Niala Nirell
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you,

To sum up :

HttpSessionActivationListener and HttpSessionBindingListener do not need to be declared. Objects implenting those will be automatically notified.

There is an error in the book saying that only HttpSessionBindingListener do not need to be declare in the DD
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic