Skip to content

Instantly share code, notes, and snippets.

@9876691
Created March 2, 2010 18:06
Show Gist options
  • Save 9876691/319733 to your computer and use it in GitHub Desktop.
Save 9876691/319733 to your computer and use it in GitHub Desktop.
package filters;
import java.io.IOException;
import javax.servlet.*;
public class UTF8Filter implements Filter
{
public void destroy() {}
public void doFilter(ServletRequest request,
ServletResponse response, FilterChain chain)
throws IOException, ServletException
{
request.setCharacterEncoding("UTF8");
chain.doFilter(request, response);
}
public void init(FilterConfig filterConfig)
throws ServletException
{
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment