• 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

HttpSessionActivationListener

 
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do I need to config the class that implement HttpSessionActivationListener interface in web.xml?
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, any class you create that is a listener, must have an entry in the DD with the < listener> tag
 
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to ask same question for HttpSessionBindingListener
Do I need to config the class that implement HttpSessionBindingListener interface in web.xml?
( as it might be the possibility -> they can be found by itself through reflection , and then registered and notified )
 
Gagan Indus
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes , i was thinking on the right track
i just checked this with by writing code
There is NO need to configure the class that implement HttpSessionBindingListener interface in web.xml
as it is being automatically notified

Now , anyone for the original qusetion by Win
Do we need to config the class that implement HttpSessionActivationListener interface in web.xml?
------------------
Gagan (/^_^\) SCJP2
Die-hard JavaMonk -- little Java a day , keeps u going .
 
Win Yu
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But I did not see anywhere say I have to do for HttpSessionActiveListener. Is it in the spec?
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't have to do anything in web.xml for HttpSessionBindingListener.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Note: The Servlet 2.3 specification contains the javax.servlet.http.HttpSessionBindingListener and the javax.servlet.http.HttpSessionActivationListener interfaces. These interfaces are implemented by objects that are stored as session attributes and do not require registration of an event listener in web.xml. For more information, see the Javadocs for these interfaces.
 
Then YOU must do the pig's work! Read this tiny ad. READ IT!
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic