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

posted @ 2014-02-01 03:15  -六月飞雪-  阅读(464)  评论(0编辑  收藏  举报