WebLogic Problem in Chinese

xiaoxiao2021-03-06  42

This article applies to: Application Server WebLogic7, database is Oracle (a little experience that is accumulated in actual work, if you have a bit benefit, please give it a bit, add a few points, easy to browse and download, learn more Content, common improvement) a lot of ways to introduce the Chinese characters extracted in the database with java.net.urldecoder.decode ("Database Chinese Character Content") decoded, and the Chinese characters in the passing parameters use java.net. Urlencoder.Encode ("") Encoding is decoded with java.net.urldecoder.decode ("Parameters Chinese Character Content") in the next page. Set the contents of the static page

Force guarantee is not garbled (there is no garbled) due to the client workstation IE. To the JSP page by setting <% @ page language = "java" contenttype = "text / html; charset = GBK" PageEncoding = "GBK"%> mandatory guarantee is not garbled. The above setting method has a certain role in a small item, less page, environmentally stable project, but has a role, but for large projects, more page, the national promotion project, the above method shows that the workload is large, if there is a page Note that there will be garbled, flexible, if the environment changes, all pages are adjusted. This article introduces the control of different environment page character sets via web.xml and weblogic.xml, guarantee the page not garbled, pay attention to the page All of the above configurations are avoided. 1. Oracle Database Background character set is Chinese, the operating system of WebLogic7 is Chinese: Configure it in web.xml (other parameters or original configuration,

Add the following parameters)

WebLogic.httpd.inputcharset./*

GBK

There is a configuration in WebLogic.xml

ENCODING

GBK

/ *

GBK

2. Oracle Database Background character set is in English, the operating system in WebLogic7 is Chinese: Configure it in Web.xml (other parameters or original configuration,

Add the following parameters)

WebLogic.httpd.inputcharset./*

8859_1

There is a configuration in WebLogic.xml

ENCODING

8859_1

/ *

8859_1

3. Oracle Database Background character set is in English, the operating system of WebLogic7 is in English (mostly uniX operating system and no Chinese package): Configure it in Web.xml (other parameters or original configuration,

Add the following parameters)

WebLogic.httpd.inputcharset./*

GBK

There is a configuration in WebLogic.xml

ENCODING

GBK

/ *

GBK

4. Oracle Database Background character set is Chinese, the operating system of WebLogic7 is in English (mostly uniX operating system and no Chinese package): configured in Web.xml (other parameters or original configuration,

Add the following parameters)

WebLogic.httpd.inputcharset./*

8859_1

There is a configuration in WebLogic.xml

ENCODING

8859_1

/ *

8859_1

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

New Post(0)