Tomcat under HTM Chinese page garbled problem solving __ garbled problem

Source: Internet
Author: User

In the work has a running under Tomcat application, with UTF-8 encoded HTM page is always garbled, ie in code always defaults to "Western Europe" code, set the

<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/> also no avail. Finally in the%tomcat%/conf/web.xml modified the

<mime-mapping>
<extension>htm</extension>
<mime-type>text/html;charset=utf-8</mime-type>
</mime-mapping>
<mime-mapping>
<extension>html</extension>
<mime-type>text/html;charset=utf-8</mime-type>
</mime-mapping>

After the HTM normal access, IE code defaults to "UTF-8", which red for my new addition.

In addition, some friends suggest modifying the following configuration in%tomcat%/conf/server.xml (where the red is the new addition)

<connector
port= "8080"
Redirectport= "8443"
Minsparethreads= "25"
connectiontimeout= "20000"
maxsparethreads= "75"
maxthreads= "80"
Maxhttpheadersize= "8192"
Disableuploadtimeout= "true"
Usebodyencodingforuri= "true"
Urincoding= "UTF-8"
>
</Connector>

But the change does not work.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.