Java-ServletContextAttributeListener
/** Implementations of this interface receive notifications of
** changes to the attribute list on the servlet context of a web application.
* To receive notification events, the implementation class
* must be configured in the deployment descriptor for the web application.
* @see ServletContextAttributeEvent
* @since v 2.3
*/
//实现这个接口会收到web 应用中的servlet context属性链修改的通知
public interface ServletContextAttributeListener extends EventListener {
/** Notification that a new attribute was added to the servlet context. Called after the attribute is added.*/
//一个属性被添加给servlet context之前会通知
public void attributeAdded(ServletContextAttributeEvent scab);
/** Notification that an existing attribute has been removed from the servlet context. Called after the attribute is removed.*/
//属性被删除之后通知
public void attributeRemoved(ServletContextAttributeEvent scab);
/** Notification that an attribute on the servlet context has been replaced. Called after the attribute is replaced. */
//属性被替换后通知
public void attributeReplaced(ServletContextAttributeEvent scab);
}
Java-ServletContextAttributeListener的更多相关文章
- Spark案例分析
一.需求:计算网页访问量前三名 import org.apache.spark.rdd.RDD import org.apache.spark.{SparkConf, SparkContext} /* ...
- Java监听器
监听器 1.概念 监听器:主要是用来监听特定对象的创建,属性的变化的!,本质上却是一个实现特定接口的普通java类! 对象分为自己创建自己使用的,和别人创建自己用的,自己创建的不需要监听,值需要取监听 ...
- [Java] JSP笔记 - Listener 监听器
Java Web 开发时,可以使用 Listener 来监听来监听一些事件,从而实现一些功能.实际上这个监听器,原理就是 Delphi 中大家常用的各种事件. 1. 那么,监听器的主要用途用哪些呢: ...
- 轻量级Java EE企业应用实战(第4版):Struts 2+Spring 4+Hibernate整合开发(含CD光盘1张)
轻量级Java EE企业应用实战(第4版):Struts 2+Spring 4+Hibernate整合开发(含CD光盘1张)(国家级奖项获奖作品升级版,四版累计印刷27次发行量超10万册的轻量级Jav ...
- java web学习总结(二十) -------------------监听器属性详解
一.监听域对象中属性的变更的监听器 域对象中属性的变更的事件监听器就是用来监听 ServletContext, HttpSession, HttpServletRequest 这三个对象中的属性变更信 ...
- Java Servlet完全教程
Servlet 是一些遵从Java Servlet API的Java类,这些Java类可以响应请求.尽管Servlet可以响应任意类型的请求,但是它们使用最广泛的是响应web方面的请求. Servle ...
- 【Java EE 学习 21 上】【其它类型的监听器】【使用HttpSessionActivationListener监听session的活化和钝化】
一.ServletContextListener Method Summary void contextDestroyed(ServletContextEvent sce) R ...
- 【Java EE 学习 20】【使用过滤器实现登陆验证、权限认证】【观察者模式和监听器(使用监听器实现统计在线IP、登录IP 、踢人功能)】
一.使用过滤器实现登录验证.权限认证 1.创建5张表 /*使用过滤器实现权限过滤功能*/ /**创建数据库*/ DROP DATABASE day20; CREATE DATABASE day20; ...
- Java EE 学习总结
1.Java EE WEB 工程项目文件结构 组成:静态HTML页.Servlet.JSP和其他相关的class: 每个组件在WEB应用中都有固定的存放目录. WEB应用的配置信息存放在web.xml ...
- Java程序员从笨鸟到菜鸟之(二十一)java过滤器和监听器详解 【转】
过滤器 1.Filter工作原理(执行流程) 当客户端发出Web资源的请求时,Web服务器根据应用程序配置文件设置的过滤规则进行检查,若客户请求满足过滤规则,则对客户请求/响应进行拦截,对请求头和请 ...
随机推荐
- Swift下多个Storyboard的项目结构
我是个比较喜欢用storyboard和xib的人.我个人的习惯就是,能用storyboard的一定不用代码手工撸.当然自己业余个人写的项目,基本上一个storyboard就搞定了.但涉及到多人合作下时 ...
- UE4使用第三方库读写xml文件
原文链接:http://gad.qq.com/article/detail/7181031 本文首发腾讯GAD开发者平台,未经允许,不得转载 在游戏开发过程中,读写xml几乎已经成为不可或缺的功能,但 ...
- Core Python Programming一书中关于深浅拷贝的错误
该书关于深浅拷贝的论述: 6.20. *Copying Python Objects and Shallow and Deep Copies "when shallow copies are ...
- svn数据仓库配置,权限配置
svn服务的开启有两种方式, · 自带的svnserve服务(访问地址类似于svn://192.168.80.18/repos/) · 与Apache配合使用 (访问地址 ...
- 如何查看App provision profile文件中的钥匙链访问组名称
大熊猫猪·侯佩原创或翻译作品.欢迎转载,转载请注明出处. 如果觉得写的不好请多提意见,如果觉得不错请多多支持点赞.谢谢! hopy ;) 我们因为某些原因希望安全的在多个App中共享一些信息,我们可以 ...
- Android存储之SharedPreferences
Android数据存储之SharedPreferences SharedPreferences对象初始化 SharedPreferences mSharedPreferences = getShare ...
- Android初级教程:屏幕分辨率
在app编码中经常需要获取手机的屏幕分辨率(宽*高),原来我直接上网拷贝代码,但在使用过程中却发现诸多不便. 不便一:下面代码中的getWidth和getHeight在adt上提示deprecated ...
- Servlet编程实例-servlet学习之旅(三)
LoginServlet代码: public class LoginServlet extends HttpServlet{ @Override protected void service(Http ...
- J2EE学习从菜鸟变大鸟之九 深入浅出理解 Servlet-----实例解析
关于Servlet的基础内容在前面已经和大家分享过了,参考J2EE学习从菜鸟变大鸟之七 Servlet,现在结合到DRP中学习,深刻的体会Servlet起到了枢纽中转的作用,控制逻辑(到MVC中更像是 ...
- Android进阶(一)几种网络请求方式详解
Ref:http://blog.csdn.net/zuolongsnail/article/details/6373051 Android应用经常会和服务器端交互,这就需要手机客户端发送网络请求,下面 ...