Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Listener question  RSS feed

 
Graham VMead
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I'm checking out an article about Servlet Listeners using WSAD and a class that implements ServletContextListener and HttpSessionListener.

Something was going wrong with an instance variable defined on this class
i.e they set the variable in the contextInitalised() method but this was not reflected in the sessionCreated method.

After putting a System.out in the constructor I found that TWO listener objects were being created.

Does anyone know if this is a WSAD funny or its because there are two listener interfaces implemented and is this Servlet 2.3 compliant??

TIA Graham
 
Graham VMead
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh yes the Listener is defined only once in the web.xml
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!