标签:web ini package dispatch types pat public print val
package cn.hopetesting.filter;
import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;
/**
* @author newcityman
* @date 2019/9/12 - 21:29
*/
//@WebFilter(value = "/index.jsp",dispatcherTypes=DispatcherType.REQUEST)
//@WebFilter(value = "/index.jsp",dispatcherTypes=DispatcherType.FORWARD)
@WebFilter(value = "/index.jsp",dispatcherTypes={DispatcherType.REQUEST,DispatcherType.FORWARD})
public class FilterDemo05 implements Filter {
public void destroy() {
}
public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws ServletException, IOException {
System.out.println("filterDemo5被执行了。。。。");
chain.doFilter(req, resp);
}
public void init(FilterConfig config) throws ServletException {
}
}
标签:web ini package dispatch types pat public print val
原文地址:https://www.cnblogs.com/newcityboy/p/11515565.html