[JAVA] get ,post 한글깨짐

Posted by 김성철

한글깨짐 현상

* get 방식이든 ajax 방식이든 전송하며 한글이 깨짐  
참고 URL : https://fruitdev.tistory.com/64  

POST 전송시에 한글 깨짐

JSP 페이지 상단에 인코딩 기재  
  
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>  

GET 전송시에 한글 깨짐

Tomcat의 server.xml에 URIEncoding 옵션을 추가해 준다.  
  
아파치를 연동하여 AJP를 사용할 경우 AJP connector에도 해당 옵션을 추가해 준다.  
  
=====================================================================================================================================================  
  
  <Connector port="8080" protocol="HTTP/1.1"  
		   connectionTimeout="20000"  
		   redirectPort="8443" URIEncoding="UTF-8" />  
  
=====================================================================================================================================================