File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "listener" Watch "listener" New topic
Author

listener

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
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Take a look at the API for ServletContextListener:
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/ServletContextListener.html

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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: listener