下述代码定义了两个过滤器,并在web.xml配置完毕: Filter1.java public class Filter1 implements Filter { @Override public void destroy() { } @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { System.out.println('enter Filter1'); chain.doFilter(request, response); System.out.println('exit Filter1'); } @Override public void init(FilterConfig arg0) throws ServletException { } } Filter2.java public class Filter2 implements Filter { @Override public void destroy() { } @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { System.out.println('enter Filter2'); chain.doFilter(request, response); System.out.println('exit Filter2'); } @Override public void init(FilterConfig arg0) throws ServletException { } } web.xml filter1 x.Filter1 filter2 x.Filter2 filter1 /* filter2 /* 当访问网站首页时,控制台的输出为 ( )。
A.
enter Filter1 enter Filter2 exit Filter2 exit Filter1
B.
enter Filter1 enter Filter2 exit Filter1 exit Filter2
C.
enter Filter2 enter Filter1 exit Filter2 exit Filter1
D.
enter Filter2 enter Filter1 exit Filter1 exit Filter2