A、 public void doFilter(ServletRequest request, ServletResponse response,FilterChain chain) throws IOException, ServletException { response.setContentType("text/html;charset=UTF-8"); chain.doFilter(request, response); }
B、 public void doFilter(ServletRequest request, ServletResponse response,FilterChain chain) throws IOException, ServletException { request.setCharacterEncoding("UTF-8"); chain.doFilter(request, response); }
C、 public void doFilter(ServletRequest request, ServletResponse response,FilterChain chain) throws IOException, ServletException { response.setCharacterEncoding("UTF-8"); chain.doFilter(request, response); }
D、 public void doFilter(ServletRequest request, ServletResponse response,FilterChain chain) throws IOException, ServletException { request.setCharacterEncoding("UTF-8"); response.setContentType("text/html;charset=UTF-8"); chain.doFilter(request, response); }