Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Session Listener

 
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?
 
Ranch Hand
Posts: 893
Tomcat Server Java Ubuntu
  • 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
 
Ew. You guys are ugly with a capital UG. Here, maybe this tiny ad can help:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic