Project

General

Profile

バグ #567

ニックネームの文字化け

Added by みぞ @mizo0203 over 1 year ago. Updated over 1 year ago.

Status:
完了
Priority:
通常
Target version:
Start date:
12/14/2019
Due date:
% Done:

100%

Estimated time:
Spent time:
#1

Updated by みぞ @mizo0203 over 1 year ago

  • Status changed from 新規 to 完了
  • % Done changed from 0 to 100

環境

  • CentOS 7
  • Tomcat 7

解決策

/etc/tomcat/server.xml の 73 行目付近に
URIEncoding="UTF-8"useBodyEncodingForURI="true" を追記して、Tomcat を再起動で解決

修正後の /etc/tomcat/server.xml から抜粋

    <!-- A "Connector" represents an endpoint by which requests are received
         and responses are returned. Documentation at :
         Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
         Java AJP  Connector: /docs/config/ajp.html
         APR (HTTP/AJP) Connector: /docs/apr.html
         Define a non-SSL HTTP/1.1 Connector on port 8080
    -->
    <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" URIEncoding="UTF-8" useBodyEncodingForURI="true" />

Tomcat 再起動コマンド

# systemctl restart tomcat

参考にしたサイト


# cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)
# tomcat version
Server version: Apache Tomcat/7.0.76
Server built:   Mar 12 2019 10:11:36 UTC
Server number:  7.0.76.0
OS Name:        Linux
OS Version:     3.10.0-1062.4.3.el7.x86_64
Architecture:   amd64
JVM Version:    1.8.0_232-b09
JVM Vendor:     Oracle Corporation
# diff /etc/tomcat/server.xml.org /etc/tomcat/server.xml
73c73
<                redirectPort="8443" />
---
>                redirectPort="8443" URIEncoding="UTF-8" useBodyEncodingForURI="true" />

Also available in: Atom PDF