Web - 过滤器Filter & 监听器Listener

一、过滤器Filter filter运行在servlet和jsp之前 , 对客户端访问的资源进行过滤.        符合条件放行 , 不符合条件不放行 .(使用FilterChain.doFilter方法放行!) 1.filter的写法. 首先需编写一个类 , 实现filter接口 , 实现doFilter()方法. 1.配置文件的写法: 在web.xml中进行配置. <filter>
相关文章
相关标签/搜索