实现接口Filter
public class FilterDemo1 implements Filter{
@Override
public void init(FilterConfig filterConfig) throws ServletException {
}
@Override
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
System.out.println("Filter被执行了。。。");
//filterChain.doFilter(servletRequest,servletResponse);
}
@Override
public void destroy() {
}
} |
|