WebLogic Chinese solution

zhaozj2021-02-16  81

Situation 1: The Chinese prompt information in the JSP file does not display the solution correctly: add <% @ Page ContentType = "text / html; charset = GBK"%> to solve this problem in the JSP file

Situation 2: When the JSP file contains Chinese prompt information, the solution cannot be correctly compiled: section of WebLogic.xml file is added to Compilersupportsencoding True Encoding GBK solves this problem.

Situation 3: When the Chinese retrieved from the database is displayed in this case, in this case, if the database uses the Chinese character set, and use Type 2 JDBC Driver, for WebLogic, use it provides When OCI driver, you can add WebLogic.codeset = GBK properties to solve this problem.

Situation 4: When passing between JSP files, if Chinese data cannot be passed correctly, add WebLogic.httpd.inputcharset ./* GBK solves this problem.

Situation 5: To make the browser correctly display Chinese, add:

After setting the above five methods, your JSP can handle Chinese simply like processing English :) No need to pass any GetBytes conversion!

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

New Post(0)