Home  >  Article  >  Web Front-end  >  jsp pages including html pages appear garbled_html/css_WEB-ITnose

jsp pages including html pages appear garbled_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:57:201174browse

In the jsp page, after including an html file containing Chinese characters, garbled characters will appear when displayed in the browser. In this case, the following code needs to be configured in web.xml:

<jsp-config>	<jsp-property-group>		<description>Special property group for html Configuration JSP example.</description>		<display-name>JSPConfiguration</display-name>		<url-pattern>*.html</url-pattern>		<el-ignored>true</el-ignored>		<page-encoding>UTF-8</page-encoding>   <!-- 此处为项目使用的编码方式 -->		<scripting-invalid>false</scripting-invalid>		<include-prelude></include-prelude>		<include-coda></include-coda>	</jsp-property-group></jsp-config>

Used in jsp page: <%@include file="../common/operations/head.html"%>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn