File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes listener Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "listener" Watch "listener" New topic


ben oliver
Ranch Hand

Joined: Mar 28, 2006
Posts: 375
I would like to implement an application level listener in web.xml, i.e. this listener is not included in the <servlet> section. It is just in the <web-app> section. Just wondering --- when will this listener be effective ? will it be effective as soon as the .war is loaded on the server ?
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Take a look at the API for ServletContextListener:

This is also covered in detail in the Servlet Spec.
You can find a link to the spec in my signature.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: listener
It's not a secret anymore!