Java-ServletContextEvent-ServletContextAttributeEvent
//这是一个事件类用来通知一个web 应用的servlet 上下文的改变 public class ServletContextEvent extends java.util.EventObject { /** Construct a ServletContextEvent from the given context. * * @param source - the ServletContext that is sending the event. */ public ServletContextEvent(ServletContext source) { super(source); } /** * Return the ServletContext that changed. * * @return the ServletContext that sent the event. */ public ServletContext getServletContext () { return (ServletContext) super.getSource(); } }
public class ServletContextAttributeEvent extends ServletContextEvent { private String name; private Object value; /** Construct a ServletContextAttributeEvent from the given context for the ** given attribute name and attribute value. */ //构造一个servlet上下文属性事件 public ServletContextAttributeEvent(ServletContext source, String name, Object value) { super(source); this.name = name; this.value = value; } /** * Return the name of the attribute that changed on the ServletContext. * */ public String getName() { return this.name; } /** * Returns the value of the attribute that has been added, removed, or replaced. * If the attribute was added, this is the value of the attribute. If the attribute was * removed, this is the value of the removed attribute. If the attribute was replaced, this * is the old value of the attribute. * */ public Object getValue() { return this.value; } }
Java-ServletContextEvent-ServletContextAttributeEvent的更多相关文章
- 几百道常见Java初中级面试题
注: 有的面试题是我面试的时候遇到的,有的是偶然看见的,还有的是朋友提供的, 稍作整理,以供参考.大部分的应该都是这些了,包含了基础,以及相对深入一点点的东西. JAVA面试题集 基础知识: ...
- 浅谈servlet版本
说白话,eclipseJ2EE版本新建一个web项目后,在IDE中的项目根目录下会看到2.3,2.4,2.5,3.0,3.1....据说最新的4.0在路上,已经有草案了,很期待ing. 360百科是这 ...
- JTSL/EL Expression学习
最早的一个学习笔记,时间过去了久了,供java web初学者参考. JTSL/EL Expression学习安排 学习目标:掌握几个常见标签的使用,通晓工作原理,详细到代码层面,遇到问题时能查得出异常 ...
- servlet--百度百科
Servlet(Server Applet),全称Java Servlet, 未有中文译文.是用Java编写的服务器端程序.其主要功能在于交互式地浏览和修改数据,生成动态Web内容.狭义的Servle ...
- Spark案例分析
一.需求:计算网页访问量前三名 import org.apache.spark.rdd.RDD import org.apache.spark.{SparkConf, SparkContext} /* ...
- Java监听器
监听器 1.概念 监听器:主要是用来监听特定对象的创建,属性的变化的!,本质上却是一个实现特定接口的普通java类! 对象分为自己创建自己使用的,和别人创建自己用的,自己创建的不需要监听,值需要取监听 ...
- 【Java EE 学习 21 上】【其它类型的监听器】【使用HttpSessionActivationListener监听session的活化和钝化】
一.ServletContextListener Method Summary void contextDestroyed(ServletContextEvent sce) R ...
- Java EE 学习总结
1.Java EE WEB 工程项目文件结构 组成:静态HTML页.Servlet.JSP和其他相关的class: 每个组件在WEB应用中都有固定的存放目录. WEB应用的配置信息存放在web.xml ...
- Java中Filter、Servlet、Listener的学习
1.Filter的功能filter功能,它使用户可以改变一个 request和修改一个response. Filter 不是一个servlet,它不能产生一个response,它能够在一个reques ...
- 转 Java中Filter、Servlet、Listener的学习
1.Filter的功能filter功能,它使用户可以改变一个 request和修改一个response. Filter 不是一个servlet,它不能产生一个response,它能够在一个requ ...
随机推荐
- Android对话框Dialog深度剖析
对话框 对话框是提示用户作出决定或输入额外信息的小窗口. 对话框不会填充屏幕,通常用于需要用户采取行动才能继续执行的模式事件. 对话框设计 Dialog 类是对话框的基类,但您应该避免直接实例化 Di ...
- C++:如何删除string对象的末尾非数字字符
功能实现: 现有一个string对象包含数字字符以及非数字字符,实现删除string对象的末尾非数字字符. 实例: 输入为"0 1 1 2 3 " 输出为"0 1 ...
- 删除表中重复行SQL
delete from table_name a where rowid < (select max(rowid) from table_name b where a.col1 = b.col1 ...
- java中抽象类的定义和使用
java虽然比较简单,但是细节的知识点还是很多的,现在,介绍一下抽象类的定义和实现基础. 指的是在类中定义方法,而不去实现它,而在它的子类中去具体实现,继承抽象类的子类必须实现父类的抽象方法,除非子类 ...
- Dynamics CRM 窗体Javascript获取时间字段值的准确转换
本篇延续上篇博文继续时间字段的转化实验,本篇讲的是在窗体Javascript中获取及更新时间字段的具体写法,是否需要进行时制的转化,先看下通过ODATA取到的时间字段值 当然取出来看格式就知道是不能直 ...
- [python] 带有参数并且传递参数的装饰器
场景时这样的,我有个一大堆任务,我要给这些任务计时,入库.就需要一个带有参数的装饰器来记录任务名称, 在任务执行前和执行之后都需要记录任务当时执行的时刻. #-*- encoding=utf-8 -* ...
- Shell脚本编程入门(一)
最近在学shell,记录一下. if语句的使用: 1.判断两个参数大小 #!/bin/sh #a test about if statement a=10 b=20 if [ $a -eq $b ]; ...
- unix os下du df简单用法
转自:http://dadoneo.iteye.com/blog/984963 du命令参数详解见:http://baike.baidu.com/view/43913.htm 下面我们只对其做简单介绍 ...
- erMaster插件
需求: 在做开源项目时,了解基本业务后.试图从数据库表设计来分析项目.通过visio时绘制操作繁琐,另外不能与数据库连动.于是想找一款快速绘制er图,并且能够和数据库连动的软件工具. eclipse插 ...
- Hessian探究(一)Hessian与Spring结合
上一篇博客Hessian探究(一)Hessian入门示例我们初步简单的介绍了一下Hessian的使用入门示例,由于Spring现在使用的实在是太广泛了,接下来我们介绍一下Hessian和Spring一 ...