1. Ensure that the linux server uses utf-8
local -a //查看支持的字体
vi /etc/sysconfig/i18n
and change it to
zh_CN.UTF-8
2. Client software Xshell, putty, SSH Secure Shell Client and other client encodings are changed to utf-8
Free video tutorial sharing:linux video tutorial
3. Modify the server.xml file encoding to utf-8
URIEncoding="UTF-8"
4. Modify the catalina.sh file
if [ -z "$LOGGING_MANAGER" ]; then JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dfile.encoding=UTF8 -Dsun.jnu.encoding=UTF8" else JAVA_OPTS="$JAVA_OPTS $LOGGING_MANAGER -Dfile.encoding=UTF8 -Dsun.jnu.encoding=UTF8" fi
Recommended related articles and tutorials: linux tutorial
The above is the detailed content of Garbled characters appear when starting tomcat on a linux server. For more information, please follow other related articles on the PHP Chinese website!