/**
     * 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的更多相关文章

  1. JAVA监听器Listener

    JAVA监听器Listener 一. 简介 监听器用于对web中内置对象的状态或者属性变化进行监听并做出相应响应的一种Servlet;在内置对象的生命周期中,产生.销毁等状态发生变化时,监听器就会进行 ...

  2. 在Java Web程序中使用监听器可以通过以下两种方法

    之前学习了很多涉及servlet的内容,本小结我们说一下监听器,说起监听器,编过桌面程序和手机App的都不陌生,常见的套路都是拖一个控件,然后给它绑定一个监听器,即可以对该对象的事件进行监听以便发生响 ...

  3. Java Web 学习与总结(二)Servlet核心接口+Servlet3.0配置

    Servlet3.0版本对Servlet配置进行了重大变革,Servlet类不需要再麻烦的去编辑web.xml文件了,只需要在类上面进行注释就可以了,获得了 Java 社区的一片赞誉之声,以下是新增的 ...

  4. 【JAVA EE企业级开发四步走完全攻略】

    本文是J2EE企业级开发四步走完全攻略索引,因内容比较广泛,涉及整个JAVA EE开发相关知识,这是一个长期的计划,单个发blog比较零散,所以整理此索引,决定以后每发一季JAVA EE blog后会 ...

  5. Java开发工程师(Web方向) - 02.Servlet技术 - 第3章.Servlet应用

    第3章.Servlet应用 转发与重定向 转发:浏览器发送资源请求到ServletA后,ServletA传递请求给ServletB,ServletB生成响应后返回给浏览器. 请求转发:forward: ...

  6. java web Listener的简单使用案例

    1.web.xml的配置 <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi= ...

  7. Java Servlet 3.0 新特性

    Servlet 3.0 新特性概述 Servlet 3.0 作为 Java EE 6 规范体系中一员,随着 Java EE 6 规范一起发布.该版本在前一版本(Servlet 2.5)的基础上提供了若 ...

  8. Java Listener

    六.  Java Listener 1.  Java Listener 简介 * Java Listener 1. Java Listener(即:Java 监听器):用于监听 ServletRequ ...

  9. Java EE javax.servlet中的ServletContext接口

    ServletContext接口 public interface ServletContext (https://docs.oracle.com/javaee/7/api/javax/servlet ...

  10. java:(监听,上传,下载)

    1.监听: index.jsp: <%@ page language="java" import="java.util.*" pageEncoding=& ...

随机推荐

  1. Swift Review总结:从 Swift Style 开始

    每个语言都有自己的推荐风格.显然OC与Swift有着不同的风格.当我们开始写Swift,首先要注意的就是按照Swift的风格写,而不是沿用OC的风格. 省略句末的分号 swift推崇简洁的语法.如果一 ...

  2. 如果用一个循环数组q[0..m-1]表示队列时,该队列只有一个队列头指针front,不设队列尾指针rear,求这个队列中从队列投到队列尾的元素个数(包含队列头、队列尾)。

    #include <iostream> using namespace std; //循环队列(少用一个空间)长度 #define M (8+1) typedef struct node ...

  3. 分享一个CUDA的环境配置属性表,从此不用再担心配置不好CUDA环境了

    本文适用: Visual Studio 2008,C++, CUDA版本不限,不过我用的是5.5做的实验. 先贴出属性表的内容: <?xml version="1.0" en ...

  4. Dialog样式的Activity

    效果图: 设置全屏模式: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInst ...

  5. Map俩种遍历方式

    Map本身没有迭代器因而在遍历其中元素时需要采取新的措施,在JDK中提供了俩种方法 keySet Set<K> keySet() 返回此映射中包含的键的 Set 视图.该 set 受映射支 ...

  6. 搜索----Android Demo

    在前面的博客中,小编简单的介绍了,点击发现按钮,自动加载热门的相关数据,成长的脚步从不停歇,完成了发现的功能,今天我们来简单看一下如何在搜索栏中输入关键字,搜索出我们所需要的信息,今天这篇博文小编就简 ...

  7. 【Unity Shader实战】卡通风格的Shader(二)

    写在前面 本系列其他文章: 卡通风格的Shader(一) 好久没写博客了,一定是因为课程作业比较多,一定不是因为我懒,恩恩. 三个月以前,在一篇讲卡通风格的Shader的最后,我们说到在Surface ...

  8. 【一天一道LeetCode】#155. Min Stack

    一天一道LeetCode 本系列文章已全部上传至我的github,地址:ZeeCoder's Github 欢迎大家关注我的新浪微博,我的新浪微博 欢迎转载,转载请注明出处 (一)题目 Design ...

  9. RabbitMQ消息队列(五):Routing 消息路由

        上篇文章中,我们构建了一个简单的日志系统.接下来,我们将丰富它:能够使用不同的severity来监听不同等级的log.比如我们希望只有error的log才保存到磁盘上. 1. Bindings ...

  10. Windows Server2012R2 安装 SharePoint 2013 的必备组件

    Windows Server2012R2目前支持SharePoint Server 2013 with Service Pack 1 和 SharePoint Foundation 2013 with ...