Java-ServletContextEvent-ServletContextAttributeEvent
2024-10-13 20:15:45
//这是一个事件类用来通知一个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; } }
最新文章
- 原生JavaScript实现hasClass、addClass、removeClass、toggleClass
- Html5+Css3制作下拉菜单的三种方式
- NSMutableAttributedString(转)
- cocos2dx &;&; Lua 环境配置
- php路径目录解析函数dirname basename pathinfo区别及实例
- python mysql desc
- GLSL实现Interactive Fluid 流体【转】
- javasctipt显示几分钟前、几天前等
- ORM之一:适合我的ORM
- poj2960 S-Nim
- Docker学习笔记 — Docker私有仓库搭建【转载】
- Elasticsearch基础教程
- Invalid environment specified: http://datatables.org/alltables.env
- ROS之坑
- Flutter工程无法找到Android真机或Android模拟器
- HBase应用快速开发
- Python date,datetime,time等相关操作总结
- vue-router导航钩子
- webpack打包之无依赖模块
- Linux 双向 SSH 免密登录
热门文章
- JDK 源码学习——ByteBuffer
- sklearn:聚类clustering
- 理解性能的奥秘——应用程序中慢,SSMS中快(2)——SQL Server如何编译存储过程
- activiti processEngineLifecycleListener使用
- Unable to access the IIS metabase.You do not have sufficient privilege
- Java程序员的必备知识-类加载机制详解
- 【一天一道LeetCode】#326. Power of Three
- Request中Attribute 和 Parameter 的区别
- Android进阶(二十五)setTextColor()的参数设置方式
- Android进阶(一)几种网络请求方式详解