/**
* 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
* @since v 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 );
}
Java-ServletContextListener
原创
©著作权归作者所有:来自51CTO博客作者归田归田的原创作品,请联系作者获取转载授权,否则将追究法律责任
下一篇:Java集合之Hashtable
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章