TOMCAT+JSP does not support Chinese display problem how to solve __js

Source: Internet
Author: User

TOMCAT+JSP does not support Chinese display
Reason:
1 Tomcat internal settings, HTML and HTML files not supported in Chinese
No Chinese code is set in the 2 JSP page

Workaround:
1
All html,htm files are changed to the JSP suffix and added to the header
<% @page contenttype= "text/html"%>
<% @page pageencoding= "gb2312"%>
2
If it's still unresolved, in the Tomcat directory
Modify the content in the C:/tomcat/conf/web.xml
<mime-mapping>
<extension>htm</extension>
<mime-type>text/html;charset=gb2312</mime-type>
</mime-mapping>
<mime-mapping>
<extension>html</extension>
<mime-type>text/html;charset=gb2312</mime-type>
</mime-mapping>

Related Article

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.