1. JSP 페이지 1번 줄에 셋팅
<%@ page language=”java” contentType=”text/html; charset=UTF-8″ pageEncoding=”UTF-8″%>
2. post 방식의 파라미터를 받는 페이지마다 해당 라인 추가
<% request.setCharacterEncoding(“UTF-8”); %>?
3. 톰캣 server.xml 파일에 Connector마다 URIEncoding=”utf-8″ 추가
<Connector URIEncoding=”UTF-8″ address=”0.0.0.0″ connectionTimeout=”20000″ port=”8080″ protocol=”HTTP/1.1″ redirectPort=”8443″/>
4. 톰캣 web.xml 파일 수정
<filter>
<filter-name>setCharacterEncodingFilter</filter-name>
<filter-class>org.apache.catalina.filters.SetCharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<async-supported>true</async-supported>
</filter>
<filter-name>setCharacterEncodingFilter</filter-name>
<filter-class>org.apache.catalina.filters.SetCharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<async-supported>true</async-supported>
</filter>