일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- WebLogic
- Eclipse
- node.js
- jsr 296
- PLSQL
- ibsheet
- 가우스
- sencha touch
- JDOM
- MFC
- appspresso
- Android
- swingx
- 전자정부프레임워크
- tomcat
- Spring
- iBATIS
- jQuery
- oracle
- Ajax
- dock
- GPS
- phonegap
- MySQL
- 선택적조인
- rowspan
- PHP
- Struts
- Google Map
- JSON
- Today
- Total
Where The Streets Have No Name
톰캣(tomcat 5.5.9) 한글 설정 본문
context_root/WEB-INF/web.xml에 필터 관련 추가
context_root/WEB-INF/classes/filters/SetCharacterEncodingFilter.class 가 있어야함
<filter>
<filter-name>Set Character Encoding</filter-name>
<filter-class>filters.SetCharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>EUC_KR</param-value>
</init-param>
</filter>
<!-- Define filter mappings for the defined filters -->
<filter-mapping>
<filter-name>Set Character Encoding</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
2. get 방식 설정
tomcat_root/conf/server.xml에 사용포터에 URIEncoding="euc-kr"을 추가
아파치와 연동 되면 다음과 같이
<Connector port="18009"
enableLookups="false" redirectPort="8443" protocol="AJP/1.3" URIEncoding="euc-kr" />
톰캣 단독 이면 다음과 같이
<Connector port="8080" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="euc-kr" />
3. include 파일에 한글을 사용할 경우 다음 태그를 맨 처음 사용해야한다.
<%@page pageEncoding="euc-kr"%>