jsp乱码问题

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

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

 

jsp乱码问题
 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>
jsp乱码问题

或者

jsp乱码问题
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>
jsp乱码问题

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

jsp乱码问题

上一篇:struts 标签导入


下一篇:黑马程序员_java基础笔记(09)...HTML基本知识