Filter过滤器学习
一、Filter简介
Filter也称之为过滤器,它是Servlet技术中最激动人心的技术,WEB开发人员通过Filter技术,对web服务器管理的所有web资源:例如Jsp, Servlet, 静态图片文件或静态 html 文件等进行拦截,从而实现一些特殊的功能。例如实现URL级别的权限访问控制、过滤敏感词汇、压缩响应信息等一些高级功能。
Servlet API中提供了一个Filter接口,开发web应用时,如果编写的Java类实现了这个接口,则把这个java类称之为过滤器Filter。通过Filter技术,开发人员可以实现用户在访问某个目标资源之前,对访问的请求和响应进行拦截,如下所示:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAA3cAAADxCAIAAADnUNkZAAAgAElEQVR4nO2dd1xTZ/vG81pHFWVPcSC4cKSKW3DVhaNSo1CtE9yCKEatE8U9UVDAOlt968BW0Fatew8gtLVvlz9ra+2yrW2x1TqA9PcHEE6Sk50895NwfT/XHy2Glfsi55szniP5FwAAAAAAAGsjof4BAAAAAACAAwLLBAAAAAAA1qfcMu8/eiQBHEDYhooD9ZBBKdRFAAAAYEPKX+Vv/vKLRCLJyFcgVDl391tsd9mAqpPnyvf30HYAAHBsYJkcBZbJDFSdPLBMAABweGCZHAWWyQxUnTywTAAAcHhgmRwFlskMVJ08sEwAAHB4YJkcBZbJDFSdPLBMAABweGCZHAWWyQxUnTywTAAAcHhgmRwFlskMVJ08sEwAAHB4YJkcBZbJDFSdPLBMAABweGCZHAWWyQxUnTywTAAAcHhgmRwFlskMVJ08sEwAAHB4YJkcBZbJDFSdPLBMAABweGCZHAWWyQxUnTywTAAAcHhgmRwFlskMVJ08sEwAAHB4YJkcBZbJDFSdPLBMAABweGCZHAWWyQxUnTywzApIYWHhrVu3srKyVq5cOXnKlFciItq0b1+/QQMfPz9Xd/fqNWpUr17dxc3Nx8+vXkDASyEh4QMGjJ8wISkp6cCBAzdv3nzy5An1bwCAPh48eHDlypWdO3fOnz9/THR07/BwaevW9QICfPz8XNzcqteoUe3FF51dXDy9vf3r1Qtu3rxHr57DR4yYPXt2WlramTNnfv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9+5dOzrV0iRgmRwFlskMVJ08sEwAAHB4YJkcBZbJDFSdPLBMAABweGCZHAWWyQxUnTywTAAAcHhgmRwFlskMVJ08sEwAAHB4YJkcBZbJDFSdPLBMAABweGCZHAWWyQxUnTywTAAAcHhgmRwFlskMVJ08sEwAAHB4YJkcBZbJDFSdPLBMAABweGCZHAWWyQxUnTywTAAAcHhgmRwFlskMVJ08sEwAAHB4YJkcBZbJDFSdPLBMAABweGCZHAWWyQxUnTywTAAAcHhgmRwFlskMVJ08sEwAAHB4YJkcBZbJDFSdPLBMAABweGCZHAWWyQxUnTywTAAAcHhgmRwFlskMVJ08sEwAAHB4YJkcBZbJDFSdPLBMAABweGCZHAWWyQxUnTywTAAAcHhgmRwFlskMVJ08sEwAAHB4YJkcBZbJDFSdPLBMAABweGCZHAWWyQxUnTywTAAAcHhgmRwFlskMVJ08sEwAAHB4YJkcBZbJDFSdPLBMAABweGCZHAWWyQxUnTywTAAAcHhgmRwFlskMVJ08sEwAAHB4YJkcBZbJDFSdPLBMAABweGCZHAWWyQxUnTywTAAAcHhgmRwFlskMVJ08sEwAAHB4YJkcBZbJDFSdPLBMAABweGCZHAWWyQxUnTywTAAAcHhgmRwFlskMVJ08sEwAAHB4YJkcBZbJDFSdPLBMAABweMpf5X97/FgCOICwDRUH6iGDUqiLAAAAwIbgVR4AAAAAAFgfWCYAAAAAALA+sEwAAAAAAGB9/h95jxaqbfZR0wAAAABJRU5ErkJggg==" alt="" />
二、Filter是如何实现拦截的?
Filter接口中有一个doFilter方法,当我们编写好Filter,并配置对哪个web资源进行拦截后,WEB服务器每次在调用web资源的service方法之前,都会先调用一下filter的doFilter方法,因此,在该方法内编写代码可达到如下目的:
- 调用目标资源之前,让一段代码执行。
- 是否调用目标资源(即是否让用户访问web资源)。
- 调用目标资源之后,让一段代码执行。
web服务器在调用doFilter方法时,会传递一个filterChain对象进来,filterChain对象是filter接口中最重要的一个对 象,它也提供了一个doFilter方法,开发人员可以根据需求决定是否调用此方法,调用该方法,则web服务器就会调用web资源的service方 法,即web资源就会被访问,否则web资源不会被访问。
三、Filter开发入门
3.1、Filter开发步骤
Filter开发分为二个步骤:
- 编写java类实现Filter接口,并实现其doFilter方法。
- 在 web.xml 文件中使用<filter>和<filter-mapping>元素对编写的filter类进行注册,并设置它所能拦截的资源。
过滤器范例:
public class LogFilter implements Filter {
public void init(FilterConfig config) throws ServletException {
//获取过滤器名字
String filterName = config.getFilterName();
// 获取初始化参数
String site = config.getInitParameter("Site"); // 输出初始化参数
System.out.println("网站名称: " + site);
}
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws java.io.IOException, ServletException { // 输出站点名称
System.out.println("站点网址:http://www.runoob.com"); // 把请求传回过滤链
chain.doFilter(request,response);
}
public void destroy( ){
/* 在 Filter 实例被 Web 容器从服务移除之前调用 */
}
}
在web. xml中配置过滤器:
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" > <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>Archetype Created Web Application</display-name> <!--过滤器注册-->
<filter>
<filter-name>LogFilter</filter-name>
<filter-class>com.servlet.study.LogFilter</filter-class>
<!----过滤器参数>
<init-param>
<param-name>Site</param-name>
<param-value>菜鸟教程</param-value>
</init-param>
</filter>
<!--过滤器映射-->
<filter-mapping>
<filter-name>LogFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list> </web-app>
四、Filter的生命周期
4.1、Filter的创建
Filter的创建和销毁由WEB服务器负责。 web 应用程序启动时,web 服务器将创建Filter 的实例对象,并调用其init方法,完成对象的初始化功能,从而为后续的用户请求作好拦截的准备工作,filter对象只会创建一次,init方法也只会执行一次。通过init方法的参数,可获得代表当前filter配置信息的FilterConfig对象。
4.2、Filter的销毁
Web容器调用destroy方法销毁Filter。destroy方法在Filter的生命周期中仅执行一次。在destroy方法中,可以释放过滤器使用的资源。
4.3、FilterConfig接口
用户在配置filter时,可以使用<init-param>为filter配置一些初始化参数,当web容器实例化Filter对象,调用其init方法时,会把封装了filter初始化参数的filterConfig对象传递进来。因此开发人员在编写filter时,通过filterConfig对象的方法,就可获得:
String getFilterName():得到filter的名称。
String getInitParameter(String name): 返回在部署描述中指定名称的初始化参数的值。如果不存在返回null.
Enumeration getInitParameterNames():返回过滤器的所有初始化参数的名字的枚举集合。
public ServletContext getServletContext():返回Servlet上下文对象的引用。
来自:javaweb学习总结(四十二)——Filter(过滤器)学习
Filter过滤器学习的更多相关文章
- Filter(过滤器)学习
一.Filter简介 Filter也称之为过滤器,它是Servlet技术中最激动人心的技术,WEB开发人员通过Filter技术,对web服务器管理的所有web资源:例如Jsp, Servlet, 静态 ...
- javaweb学习总结(四十二)——Filter(过滤器)学习
一.Filter简介 Filter也称之为过滤器,它是Servlet技术中最激动人心的技术,WEB开发人员通过Filter技术,对web服务器管理的所有web资源:例如Jsp, Servlet, 静态 ...
- javaWeb学习总结(10)- Filter(过滤器)学习
一.Filter简介 Filter也称之为过滤器,它是Servlet技术中最激动人心的技术,WEB开发人员通过Filter技术,对web服务器管理的所有 web资源:例如Jsp, Servlet, 静 ...
- javaWeb学习总结(10)- Filter(过滤器)学习(2)
在filter中可以得到代表用户请求和响应的request.response对象,因此在编程中可以使用Decorator(装饰器)模式对request.response对象进行包装,再把包装对象传给目 ...
- Servlet的学习之Filter过滤器技术(1)
本篇将讲诉Servlet中一项非常重要的技术,Filter过滤器技术.通过过滤器,可以对来自客户端的请求进行拦截,进行预处理或者对最终响应给客户端的数据进行处理后再输出. 要想使用Filter过滤器, ...
- [转]Servlet的学习之Filter过滤器技术
本篇将讲诉Servlet中一项非常重要的技术,Filter过滤器技术.通过过滤器,可以对来自客户端的请求进行拦截,进行预处理或者对最终响应给客户端的数据进行处理后再输出. 要想使用Filter过滤器, ...
- angularjs学习第三天笔记(过滤器第二篇---filter过滤器及其自定义过滤器)
您好,我是一名后端开发工程师,由于工作需要,现在系统的从0开始学习前端js框架之angular,每天把学习的一些心得分享出来,如果有什么说的不对的地方,请多多指正,多多包涵我这个前端菜鸟,欢迎大家的点 ...
- SpringBoot+Shiro学习(七):Filter过滤器管理
SpringBoot+Shiro学习(七):Filter过滤器管理 Hiwayz 关注 0.5 2018.09.06 19:09* 字数 1070 阅读 5922评论 1喜欢 20 先从我们写的一个 ...
- JavaWeb学习篇--Filter过滤器
Filter过滤器简介 ServletAPI中提供了一个Filter接口,开发web应用时,如果编写的 java 类实现了这个接口,则把这个java类称之为过滤器Filter. WEB服务器每次在调用 ...
随机推荐
- MyBatis之#{} and ${}
#{} 和 ${} 之间最大的差别就是 #{}会在使用的时候被加上 ‘’ 引号, ${}直接传值,不做任何处理 1.#{}对传入的参数会做预编译,也就是会当做字符串来处理 select * from ...
- 深度学习模型训练技巧 Tips for Deep Learning
一.深度学习建模与调试流程 先看训练集上的结果怎么样(有些机器学习模型没必要这么做,比如决策树.KNN.Adaboost 啥的,理论上在训练集上一定能做到完全正确,没啥好检查的) Deep Learn ...
- 基于RBAC的权限框架
RBAC权限框架(Role-Based Access Control)基于角色的权限访问控制的框架,通过用户-角色-权限的关联,非常方便的进行权限管理,在这里不再说明什么是RBAC,请自行百度. 谢谢 ...
- JavaScript数据结构——图的实现
在计算机科学中,图是一种网络结构的抽象模型,它是一组由边连接的顶点组成.一个图G = (V, E)由以下元素组成: V:一组顶点 E:一组边,连接V中的顶点 下图表示了一个图的结构: 在介绍如何用Ja ...
- .NETCore C# 中级篇2-4 一文带你完全弄懂正则表达式
.NETCoreCSharp 中级篇2-4 本节内容为正则表达式的使用 简介 有的时候,你是否有过这种需求:判断一个Ip地址.邮箱.密码规则是否合法.如果让你使用if一类的传统方法进行处理,你肯定会被 ...
- 帝国CMS(EmpireCMS) v7.5配置文件写入漏洞分析
帝国CMS(EmpireCMS) v7.5配置文件写入漏洞分析 一.漏洞描述 该漏洞是由于安装程序时没有对用户的输入做严格过滤,导致用户输入的可控参数被写入配置文件,造成任意代码执行漏洞. 二.漏洞复 ...
- springboot整合solr
上一篇博客中简要写了solr在windows的安装与配置,这一篇接上文写一下springboot整合solr,代码已经上传到github,传送门. 1.新建core并配置schema 上篇博客中已经有 ...
- 部分APP无法代理抓包的原因及解决方法
引言 HTTP应用层的抓包已经成为日常工作测试与调试中的重要一环,最近接触新项目突然之间发现之前的抓包手段都不好使了,顿时模块与模块之间的前端与服务之间的交互都变成了不可见,整个人都好像被蒙住了眼睛. ...
- Python机器学习之数据探索可视化库yellowbrick
# 背景介绍 从学sklearn时,除了算法的坎要过,还得学习matplotlib可视化,对我的实践应用而言,可视化更重要一些,然而matplotlib的易用性和美观性确实不敢恭维.陆续使用过plot ...
- Android使用WebView开发常见的坑
原文链接:http://mp.weixin.qq.com/s?__biz=MzAwODE1NTI2MQ==&tempkey=uP3a%2BOgIN7vPbLfJp3BTCl2KabYi1%2F ...