JSP 한글문제 해법

11 views
Skip to first unread message

샤키(sharky)

unread,
May 5, 2013, 11:49:38 PM5/5/13
to kor...@googlegroups.com
[JSP 한글문제]

원인 : 언어마다 Code가 있고 이것이 다릅니다.
한글 type = EUC-KR(완성성), UTF-8(유니코드)
                 DOS( 959 )

자료코드 : BCD, EBCD, ASCII, EASCII

비극의 원인 : 영문자 1bytes, 기타 2bytes 이상
 

1. Tomcat에서 해결 server.xml
<Connector URIEncoding="UTF-8" connectionTimeout="20000" port="9090" 
    protocol="HTTP/1.1" redirectPort="8443"/>

2. jsp, html 인코딩을 UTF-8

jsp : <%@ page language="java" contentType="text/html; charset=UTF-8">
       
       response.setCharacterEncoding("UTF-8");
       request.setCharacterEncoding("UTF-8");

html : <head> <meta charset="UTF-8" /> </head>

3. 이클립스에서
윈도우 -> 환경설정 -> Web -> JSP, CSS, HTML ---> UTF-8









Reply all
Reply to author
Forward
0 new messages