1. Resolve Chinese issues in the JSP page: Plus <% @ Page ContentType = "text / html; charset = GBK" in each JSP header: HTML: html locale = "true"> html: html> means using local coding.
2. Solve Chinese issues in the resource package To call the information in the resource package, we need this information in Chinese, but the resource package cannot be written directly in Chinese. Otherwise there will be garbled.
Steps: 1) First write the information of the resource package into the Chinese information you need, save the applicationResources_zh.properties 2 Run the CMD to the resource package where you are located, run the JDK command: native2ascii -Encoding GB2312 ApplicationResources_ZH.Properties Temp.txt will be Encoding is converted to ASCII, stored in TEMP.TXT. Copy the contents in Temp.txt and use it override the original content of ApplicationResources_ZH.Properties. 3) Do not need to change the resource package settings in Struts-Config.xml, which will determine according to the settings of the browser, select the corresponding resource package. For example, in IE Tool -InetNet Options - Language, select the language you need. You can choose a variety of languages, but the system will select the resource package based on the relationship. If Chinese is placed in front, the system will use the resource package of ApplicationResources_zh.Properties. 3. Solve the Chinese problem in page data transfer JSP to the bean, and then pass it to the JSP by bean, and it is garbled when the page is displayed. Add the font class in Web.xml, the content is as follows:
4. Solution of GET (Struts does not need this setting, just with instructions) Open Tomcat's server.xml file, find blocks, add the following line: uriencoding = "GBK" is complete as follows: