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=& ...
随机推荐
- 微信小程序实例-摇一摇抽奖
概述 前面我们讲了如何开始微信小程序搭建和一些组件的介绍.微信小组件和微信小程序入门 微信小程序目录 为了更好的理解小程序和小程序开发,我们首先来看一下项目的目录. 首先看下根目录下的app.json ...
- DoesNotExist at /admin/
DoesNotExist at /admin/ User has no account. Request Method: GET Request URL: http://127.0.0.1:8000/ ...
- Dynamics CRM FORM脚本库加载本地脚本
用传统的开发方式,js脚本都是保存在数据库中的,这样也方便迁移,但如果不想存数据库而是存在物理磁盘上,则可通过下述代码,将脚本存放在CRMWEB文件夹的某个路径下,每次都动态引用本地JS. funct ...
- 20 ViewPager Demo4自动轮播
MainActivity.java 思想:才用非常大的数 让其看起来可以循环轮播图片并且用户可以从尽头滑到首图的特点 . package com.qf.day20_viewpager_demo4; i ...
- IE下的deflate模式
浏览器有一个非常有用的特性:自动解压. 在使用AJAX请求数据的时候,数据在服务器端压缩传输,在浏览器端自动解压,请求直接得到解压后的结果. 在Request Header中,一般会列出浏览器支持的压 ...
- 【Netty源码解析】NioEventLoop
上一篇博客[Netty源码学习]EventLoopGroup中我们介绍了EventLoopGroup,实际说来EventLoopGroup是EventLoop的一个集合,EventLoop是一个单线程 ...
- 百度地图开发之POI数据检索
前面学习百度地图的一些基本的用法,这次我们一起来看一看百度地图的检索功能吧 poi检索api的基本用法 百度地图的POI类中共有如下几个方法 PoiBoundSearchOption POI范围内检索 ...
- Linux2.6 --系统调用处理程序
用户空间的程序无法直接执行内核代码.它们不能直接调用内核空间中的函数,因为内核驻留在受保护的地址空间上.如果进程可以直接在内核的地址空间上读写的话,系统的安全性和稳定性将不复存在. ...
- SSH深度历险(九) Struts2+DWZ+Uploadify实现多文件(文件和图片等等)上传
在gxpt_uas系统中,要实现文件(文件和图片等等,可以灵活配置)的批量上传至mongodb,在学习这个过程中,学习了mongodb,并实现了批量上传的功能,实现思路:在DWZ的基础上参考官方的实例 ...
- DB2数据库常用命令
--创建数据库 CREATE DATABASE example AUTOMATIC STORAGE YES --自动存储 ON 'D:\' DBPATH ON'D:\' --指定数据库控制文件的存储路 ...