拦截器解决乱码问题 过滤器用法: @WebFilter(filterName="nn",urlPatterns="/*") public class myfilter implements Filter{ @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { // TODO Auto-generated method stub System.out.println("ok"); chain.doFilter(request, response); } }//实现接口,使用注解,chain.doFilter方法释放请求