Java-ServletRequestListener-ServletRequestAttributeListener
/** * A ServletRequestListener can be implemented by the developer * interested in being notified of requests coming in and out of * scope in a web component. A request is defined as coming into * scope when it is about to enter the first servlet or filter * in each web application, as going out of scope when it exits * the last servlet or the first filter in the chain. * * @since Servlet 2.4 */ //Servlet请求监听器,开发者可以实现这个接口来监听请求进入或者离开web应用 public interface ServletRequestListener extends EventListener { /** The request is about to go out of scope of the web application. */ //Request销毁监听 public void requestDestroyed ( ServletRequestEvent sre ); /** The request is about to come into scope of the web application. */ //Request初始化监听 public void requestInitialized ( ServletRequestEvent sre ); }
/** * A ServletRequestAttributeListener can be implemented by the * developer interested in being notified of request attribute * changes. Notifications will be generated while the request * is within the scope of the web application in which the listener * is registered. A request is defined as coming into scope when * it is about to enter the first servlet or filter in each web * application, as going out of scope when it exits the last servlet * or the first filter in the chain. * * @since Servlet 2.4 */ //servlet 请求参数监听器,开发者可以实现这个接口来通知属性的改变 public interface ServletRequestAttributeListener extends EventListener { /** Notification that a new attribute was added to the ** servlet request. Called after the attribute is added. */ //属性添加监听 public void attributeAdded(ServletRequestAttributeEvent srae); /** Notification that an existing attribute has been removed from the ** servlet request. Called after the attribute is removed. */ //属性删除监听 public void attributeRemoved(ServletRequestAttributeEvent srae); /** Notification that an attribute was replaced on the ** servlet request. Called after the attribute is replaced. */ //属性替代监听 public void attributeReplaced(ServletRequestAttributeEvent srae); }
Java-ServletRequestListener-ServletRequestAttributeListener的更多相关文章
- JAVA监听器Listener
JAVA监听器Listener 一. 简介 监听器用于对web中内置对象的状态或者属性变化进行监听并做出相应响应的一种Servlet;在内置对象的生命周期中,产生.销毁等状态发生变化时,监听器就会进行 ...
- 在Java Web程序中使用监听器可以通过以下两种方法
之前学习了很多涉及servlet的内容,本小结我们说一下监听器,说起监听器,编过桌面程序和手机App的都不陌生,常见的套路都是拖一个控件,然后给它绑定一个监听器,即可以对该对象的事件进行监听以便发生响 ...
- Java Web 学习与总结(二)Servlet核心接口+Servlet3.0配置
Servlet3.0版本对Servlet配置进行了重大变革,Servlet类不需要再麻烦的去编辑web.xml文件了,只需要在类上面进行注释就可以了,获得了 Java 社区的一片赞誉之声,以下是新增的 ...
- 【JAVA EE企业级开发四步走完全攻略】
本文是J2EE企业级开发四步走完全攻略索引,因内容比较广泛,涉及整个JAVA EE开发相关知识,这是一个长期的计划,单个发blog比较零散,所以整理此索引,决定以后每发一季JAVA EE blog后会 ...
- Java开发工程师(Web方向) - 02.Servlet技术 - 第3章.Servlet应用
第3章.Servlet应用 转发与重定向 转发:浏览器发送资源请求到ServletA后,ServletA传递请求给ServletB,ServletB生成响应后返回给浏览器. 请求转发:forward: ...
- java web Listener的简单使用案例
1.web.xml的配置 <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi= ...
- Java Servlet 3.0 新特性
Servlet 3.0 新特性概述 Servlet 3.0 作为 Java EE 6 规范体系中一员,随着 Java EE 6 规范一起发布.该版本在前一版本(Servlet 2.5)的基础上提供了若 ...
- Java Listener
六. Java Listener 1. Java Listener 简介 * Java Listener 1. Java Listener(即:Java 监听器):用于监听 ServletRequ ...
- Java EE javax.servlet中的ServletContext接口
ServletContext接口 public interface ServletContext (https://docs.oracle.com/javaee/7/api/javax/servlet ...
- java:(监听,上传,下载)
1.监听: index.jsp: <%@ page language="java" import="java.util.*" pageEncoding=& ...
随机推荐
- 大话XML解析
之前我写过一篇关于xml解析的文章:http://blog.csdn.net/sdksdk0/article/details/50749326.今天这篇文章主要是进一步加深对xml基础的理解了使用,毕 ...
- [error]error while loading shared libraries: libpcre.so.1 解决
nginx 安装好之后,启动的时候报错 [root@localhost nginx-1.6.2]# /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin ...
- android的消息通知栏
在android的应用层中,涉及到很多应用框架,例如:Service框架,Activity管理机制,Broadcast机制,对话框框架,标题栏框架,状态栏框架,通知机制,ActionBar框架等等. ...
- FFmpeg的H.264解码器源代码简单分析:熵解码(Entropy Decoding)部分
===================================================== H.264源代码分析文章列表: [编码 - x264] x264源代码简单分析:概述 x26 ...
- JAVA面向对象-----instanceof 关键字
instanceof 关键字 1:快速演示instanceof Person p=new Person(); System.out.println( p instanceof Person); 2:i ...
- Hadoop MapReduce工作原理
在学习Hadoop,慢慢的从使用到原理,逐层的深入吧 第一部分:MapReduce工作原理 MapReduce 角色 •Client :作业提交发起者. •JobTracker: 初始化作业,分配 ...
- JBOSS EAP 6 系列一 新特性
在项目中,采用的架构是Springmvc+spring+EJB+Jpa等架构,当然服务器是Jboss,本次Jboss我们采用的是JBossEap6.2,Jboss7的新特性与Jboss4.5的大的改变 ...
- 最简单的基于libVLC的例子:最简单的基于libVLC的视频播放器(图形界面版)
===================================================== 最简单的基于libVLC的例子文章列表: 最简单的基于libVLC的例子:最简单的基于lib ...
- 【MATLAB】用MATLAB绘制奥运五环
[MATLAB]用MATLAB绘制奥运五环 今天用MATLAB绘制了一个奥运五环,好吧,实际上是帮人做作业,嘿嘿. 贴代码: clear; clc; N = 1000; angle = linspac ...
- 为什么很多类甚者底层源码要implements Serializable ?
为什么很多类甚者底层源码要implements Serializable ? 在碰到异常类RuntimeException时,发现Throwable实现了 Serializable,还有我们平进的ja ...