Created
August 6, 2018 07:07
-
-
Save omernaci/1b3dd369ffd899a2a635c2329a2245fa to your computer and use it in GitHub Desktop.
Encoding Filter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
public class CharacterEncodingFilter implements Filter { | |
public void init(FilterConfig config) throw ServletException { | |
} | |
public void doFilter(ServletRequest request, ServletResponse, FilterChain chain) throws IOException, ServletException { | |
request.setCharacterEncoding("UTF-8"); | |
response.setCharacterEncoding("UTF-8"); | |
chain.doFilter(request, response); | |
} | |
public void destroy() { | |
} | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment