jsp頁面中include靜態html出現亂碼問題的解決方式

來源:互聯網
上載者:User

標籤:

這個問題出現過兩次,上次沒有做好記錄,今天又出現了。不過這兩次的情景也不完全一致。

今天通過搜尋找到這篇文章的解決方式很好,可供參考。原部落格地址http://blog.csdn.net/izgnaw/article/details/6178472。

在web.xml中加入一下代碼:

  1. <!-- 控制jsp:include的編碼 -->  
  2. <jsp-config>    
  3.     <jsp-property-group>    
  4.         <description>    
  5.             Special property group for JSP Configuration HTML     
  6.             example.     
  7.         </description>    
  8.         <display-name>JSPConfiguration</display-name>    
  9.         <url-pattern>*.html</url-pattern>    
  10.         <el-ignored>true</el-ignored>    
  11.         <page-encoding>UTF-8</page-encoding>    
  12.         <scripting-invalid>false</scripting-invalid>    
  13.         <include-prelude></include-prelude>    
  14.         <include-coda></include-coda>    
  15.     </jsp-property-group>    
  16. </jsp-config>   

jsp頁面中include靜態html出現亂碼問題的解決方式

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.