Tomcat 5.5.2 Chinese display problem

xiaoxiao2021-03-06  14

1. JSP shows Chinese garbled problems.

Tomcat 5.5 / conf / web.xml

Add to the tag

javaEncoding

GBK

code show as below:

JSP

org.apache.jasper.servlet.jspservlet

fork

false

XpoweredBy

false

javaEncoding GBK

3

2. The path contains the Chinese characters cannot be resolved, that is, there is a Chinese directory in the website.

Tomcat 5.5 / Conf / Server.xml

Port = "8080" MaxHttpheadersize = "8192"

Maxthreads = "150" MINSPARETHREADS = "25" maxsparethreads = "75"

Enablelookups = "false" redirectport = "8443" acceptcount = "100"

ConnectionTimeout = "20000" DisableUploadTimeout = "True"

Uriencoding = "UTF-8" />

Where uriencoding is the attribute of setting the website encoding, the encoding is the same as the web page encoding, with UTF-8, GBK, etc.

转载请注明原文地址:https://www.9cbs.com/read-67593.html

New Post(0)