1、过滤器 1)什么是过滤器? servlet规范中定义的一种特殊的类,可以拦截容器(服务器)的调用过程。 2)编程 step1 写一个java类,实现Filter接口。 step2 在doFilter方法里,实现处理逻辑。 step3 在web.xml文件里,配置过滤器。