WebLogic Chinese problem common solution

xiaoxiao2021-03-05  22

Situation 1: Chinese prompt information in the JSP file cannot be displayed correctly

Workaround: Add to join in the JSP file

<% @ Page ContentType = "text / html; charset = GBK"%> can solve this problem

Situation 2: When the JSP file contains Chinese prompt information, it cannot be correctly compiled.

Workaround: Add to the section of WebLogic.xml file

compilersupportsencoding

True

Encoding

GBK

Can solve 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 Chinese between JSP files, if Chinese data cannot be passed correctly, add it to the web.xml file.

WebLogic.httpd.inputcharset. / [param-name "

GBK

Can solve this problem.

Situation 5: In order to make the browser correctly display Chinese, it should be added in the HTML section:

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

New Post(0)