• Post Reply Bookmark Topic Watch Topic
  • New Topic

Doubt in Listeners

 
Karne Reddy
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I read that except HttpSessionBindingListener , all should be configured
in web.xml.

But I wrote a class which is like

public class Student implements HttpSessionBindingListener,HttpSessionListener
{
private String name;
...........
}

And i have not configure in web.xml . But its working fine by calling the
sessionCreated or sessionDestroyed when i created or destroyed the session.


Can any one confirm regarding this???

I am using Tomcat5.0


-----------
SCJP
 
ravuthakumar gopalakrishnan
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try valueBound and valueUnbound
 
Yi Yuan
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Although I have not tried this listener in practice, I think there must be something wrong with your code.
 
MInu
Ranch Hand
Posts: 517
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Karne Reddy:
Hi,

I read that except HttpSessionBindingListener , all should be configured
in web.xml.



Is it correct?

Should we define HttpSessionActivationListener in DD?
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!