web.xml
<listener>
<listener-class>com.PreloadListener</listener-class>
</listener>
java代码
public class PreloadListener implements ServletContextListener{
public void contextInitialized (ServeltContextEvent sce){
//init operation
}
public void contextDestoryed (ServeltContextEvent sce){
//destory operation
}
}
<listener>
</listener>
java代码
public class PreloadListener implements ServletContextListener{
}