Web application correctly handles Chinese

zhaozj2021-02-16  90

When you have written JSP before, processing Chinese is generally added to the page to add <% @ page contenttype = "text / html; charset = GBK"%>, transfer Chinese parameters use string name = new string (Request.GetParameter ("name" ) .GetBytes ("8859_1"), "GBK"); so although solving the problem, it feels bad. Later, Filter handled parameters.

Recently developed with WebLogic, it is found that it has a simpler way to handle Chinese, no need to develop anything.

In Web.xml

WebLogic.httpd.inputcharset./*

GBK

2. In WebLogic.xml

ENCODING

GBK

I don't know what this principle is.

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

New Post(0)