一个Filter对象中的doFilter方法可以被多次调用。
举一反三
- 下面选项,Filter接口中可以被调用多次的方法是
- 每当传递请求或响应时调用Filter的doFilter方法。
- 在一个Filter中,处理Filter业务的是( )方法 A: doFilter (HttpServletRequest request,HttpServletResponse response,FilterChainchain) B: doFilter (HttpServletRequest request,HttpServletResponse response) C: doFilter (ServletRequest request,ServletResponse response ,FilterChain chain) D: doFilter (ServletRequest request, ServletResponse response)
- 在一个Filter中,处理filter业务的是()方法。 A: dealFilter(ServletRequestrequest,ServletResponseresponse,FilterChainchain) B: dealFilter(ServletRequestrequest,ServletResponseresponse) C: doFilter(ServletRequestrequest,ServletResponseresponse,FilterChainchain) D: doFilter(ServletRequestrequest,ServletResponseresponse)
- Filter过滤器中哪个方法在过滤器被销毁时被调用? A: init() B: doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) C: destory() D: init(FilterConfig config)