相关代码 |
|
package com.tarena.netctoss.util; import javax.servlet.*; import javax.servlet.http.*; import java.io.*; public class SessionFilter extends HttpFilter { @Override public void doFilter(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException,ServletException{ request.setCharacterEncoding("UTF-8"); chain.doFilter(request, response); response.setCharacterEncoding("UTF-8"); } }