jsp乱码问题

有的时候我们在页头加上chaset pageEncoding 都没用,得在web.xml中配置

照抄一下别人的,自己好找一些~

 

 1  <mime-mapping>     
 2       <extension>htm</extension>     
 3       <mime-type>text/html;charset=utf-8</mime-type>     
 4     </mime-mapping>     
 5     <mime-mapping>   
 6       <extension>html</extension>     
 7       <mime-type>text/html;charset=utf-8</mime-type>     
 8     </mime-mapping>     
 9     <mime-mapping>   
10       <extension>jsp</extension>     
11       <mime-type>text/html;charset=utf-8</mime-type>     
12     </mime-mapping>
13     <mime-mapping>   
14       <extension>action</extension>     
15       <mime-type>text/html;charset=utf-8</mime-type>     
16     </mime-mapping>

或者

1 <jsp-config>
2        <jsp-property-group>
3           <description>test encode</description>
4           <display-name>test encode</display-name>
5           <url-pattern>/*</url-pattern>
6           <page-encoding>utf-8</page-encoding>
7        </jsp-property-group>
8     </jsp-config>

摘抄自:http://blog.csdn.net/leechiyang/article/details/1843352

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。