Tomcat5.x Include page display problem solving

xiaoxiao2021-03-06  58

In Tomcat5.x, if a JSP page contains another JSP page, then the JSP file being included must decrype = text / html, and charset = GBK can display Chinese code correctly. This is equivalent to repeatedly setting the contType property in the original JSP file and the included JSP file, which is not allowed in Tomcat5 below. The way to solve this problem is to modify the application web.xml file, add the following code on the web-app node:

Special Property Group for JSP Configuration JSP EXAMPLE.

JSPConfiguration

*. jsp

True

GBK

false

Special Property Group for JSP Configuration JSP EXAMPLE.

JSPConfiguration

*. html

True

GBK

false

Suggestions

JSP

Declaration when file

Conttype

Consistent use

GBK

Encoding. because

GB2312

The encoding type can only explain the common Chinese code. There is garnary code for some spicy words.

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

New Post(0)