/**
     * 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. Appium移动自动化测试(五)--app控件获取之uiautomatorviewer

    初探 在Android的SDk提供了以下的工具来支持我们进行UI自动化测试: uiautomatorviewer:用来扫描和分析Android应用程序的UI控件的工具. uiautomator:一个包 ...

  2. SceneKit做一个旋转的地球效果

    SceneKit可以用寥寥几行帮你完成很多OpenGL复杂的3D设置代码,下面本猫就带大家完成一个旋转的3D地球的场景. 首先需要地球表面图片,将其导入到Xcode中: 我们用SceneKit内置的几 ...

  3. Cocos2D与SpriteBuilder的问题在哪提问

    大熊猫猪·侯佩原创或翻译作品.欢迎转载,转载请注明出处. 如果觉得写的不好请多提意见,如果觉得不错请多多支持点赞.谢谢! hopy ;) 我们知道Cocos2D的教程中文版的非常少,注意我没有说Coc ...

  4. [Mysql]由Data truncated for column联想到的sql_mode配置

    系统日志中出现了 ata truncated for column 'agent' at row 1 mysql出现这个问题的原因,无非就是字符集设置 或者是 字段过长导致的. mysql在初始化的时 ...

  5. iOS编程Cookbook第19章最后一个例子不能正常工作的解决办法

    大熊猫猪·侯佩原创或翻译作品.欢迎转载,转载请注明出处. 如果觉得写的不好请多提意见,如果觉得不错请多多支持点赞.谢谢! hopy ;) 在Cookbook的第19章的11节中所要解决的是在App中显 ...

  6. 【java多线程系列】java中的volatile的内存语义

    在java的多线程编程中,synchronized和volatile都扮演着重要的 角色,volatile是轻量级的synchronized,它在多处理器开发中保证了共享变量的可见性,可见性指的是当一 ...

  7. 4.0、Android Studio配置你的构建

    Android构建系统编译你的app资源和源码并且打包到APK中,你可以用来测试,部署,签名和发布.Android Studio使用Gradle,一个高级的构建套件,来自动化和管理构建进程,同时可以允 ...

  8. [代码应用]javaSE程序递归删除文件夹下的.bak文件程序源代码

    本文地址:http://blog.csdn.net/sushengmiyan/article/details/39158939 本文作者:sushengmiyan ------------------ ...

  9. API创建员工联系人

    DECLARE ln_contact_rel_id PER_CONTACT_RELATIONSHIPS.CONTACT_RELATIONSHIP_ID%TYPE; ln_ctr_object_ver_ ...

  10. 用API创建用户

    DECLARE lc_user_name VARCHAR2(100) := 'PRAJ_TEST'; lc_user_password VARCHAR2(100) := 'Oracle123'; ld ...