Writer测试

1 public class Encoding implements Filter {
2 public void destroy() { }
3 public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)throws IOException, ServletException {
4 request.setCharacterEncoding(“GBK”);
5 chain.doFilter(request, response);
6 }
7 public void init(FilterConfig filterConfig) throws ServletException { }
8 }
9