Java-ServletContextListener

来源:互联网 发布:为什么淘宝网购失效 编辑:程序博客网 时间:2024/05/29 08:11
/**  * Implementations of this interface receive notifications about * changes to the servlet context of the web application they are * part of. * To receive notification events, the implementation class * must be configured in the deployment descriptor for the web * application. * @see ServletContextEvent * @sincev 2.3 *///实现这个接口会收到这个web 应用的servlet 上下文的改变的通知public interface ServletContextListener extends EventListener {/** ** Notification that the web application initialization ** process is starting. ** All ServletContextListeners are notified of context ** initialization before any filter or servlet in the web ** application is initialized. *///上下文初始化,所有的Servlet上下文监听器都会被通知上下文初始化在web应用中所有的过滤器filter或者servlet被初始化之前。    public void contextInitialized ( ServletContextEvent sce );/** ** Notification that the servlet context is about to be shut down. ** All servlets and filters have been destroy()ed before any ** ServletContextListeners are notified of context ** destruction. */    //上下文销毁, 在ServletContextListeners被通知context销毁的时候所有的servlet和过滤器都已经被销毁    public void contextDestroyed ( ServletContextEvent sce );}

0 0