Tomcat5.x涓紝濡傛灉涓€涓猨sp椤甸潰涓寘鍚簡鍙︿竴涓猨sp椤甸潰锛岄偅涔堣鍖呭惈鐨勯偅涓猨sp鏂囦歡涓繀椤誨0鏄巆onttype=text/html,charset=GBK鎵嶈兘姝g‘鏄劇ず涓枃缂栫爜銆傝繖鏍風浉褰撲簬鍦ㄥ師jsp鏂囦歡鍜岃鍖呭惈鐨刯sp鏂囦歡涓噸澶嶈缃簡conttype灞炴€э紝鑰岃繖鍦╰omcat5浠ヤ笅鐨勭増鏈笉琚厑璁搞€傝В鍐寵繖涓棶棰樼殑鍔炴硶鏄慨鏀瑰簲鐢ㄤ笅web.xml鏂囦歡,鍦╳eb-app鑺傜偣鍔犲叆涓嬮潰鐨勪唬鐮侊細
<jsp-config>
聽 <jsp-property-group>
聽聽聽 <description>Special property group for JSP Configuration JSP example.</description>
聽聽聽 <display-name>JSPConfiguration</display-name>
聽聽聽 <url-pattern>*.jsp</url-pattern>
聽聽聽 <el-ignored>true</el-ignored>
聽聽聽 <page-encoding>GBK</page-encoding>
聽聽聽 <scripting-invalid>false</scripting-invalid>
聽聽聽 <include-prelude></include-prelude>
聽聽聽 <include-coda></include-coda>
聽聽聽
聽聽聽 <description>Special property group for JSP Configuration JSP example.</description>
聽聽聽 <display-name>JSPConfiguration</display-name>
聽聽聽 <url-pattern>*.html</url-pattern>
聽聽聽 <el-ignored>true</el-ignored>
聽聽聽 <page-encoding>GBK</page-encoding>
聽聽聽 <scripting-invalid>false</scripting-invalid>
聽聽聽 <include-prelude></include-prelude>
聽聽聽 <include-coda></include-coda>
聽</jsp-property-group>
</jsp-config>
聽
聽
寤鴻缂栧啓 jsp 鏂囦歡鏃跺0鏄?ContType 涓€鑷翠嬌鐢?GBK 缂栫爜鏂瑰紡銆傚洜涓?gb2312 缂栫爜绫誨瀷鍙兘瑙i噴甯哥敤涓枃缂栫爜銆傚浜庝竴浜涚敓鐧栧瓧浼氬嚭鐜頒貢鐮併€?/body>