拦截器解决乱码问题

拦截器解决乱码问题
过滤器用法:
	@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方法释放请求

  

posted @ 2019-07-03 10:05  黑魔法os  阅读(804)  评论(0编辑  收藏  举报