This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes Servlets and the fly likes When do Session Listeners start? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "When do Session Listeners start?" Watch "When do Session Listeners start?" New topic

When do Session Listeners start?

John Strong

Joined: Jul 23, 2006
Posts: 13
Do the session listeners specified in the DD within <listener-class> tags start when the app deploys, or do they start when the first session is created, or some other time? Or does this depend on the implementation of the specific Container?
Thanks, - John Strong (
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

If I wanted to find this out, I would put a System.out.println("I've started"); line in the constructor of a listener and then tail the server logs while starting up and hitting the application.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
wood burning stoves
subject: When do Session Listeners start?
It's not a secret anymore!