Tomcat乱码解决方法
时间:2006-09-21 来源:yjmwolf
在文件conf/server.xml中找到以下
<Connector port="80" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" useBodyEncodingForURI="true" URIncoding="UTF-8"/> 红色就是加入的部分,可以使get/post方式的编码一致。 以防万一,可以在文件conf/web.xml中修改: <mime-mapping>
<extension>htm</extension>
<mime-type>text/html;charset=utf-8</mime-type>
</mime-mapping>
<mime-mapping>
<extension>html</extension>
<mime-type>text/html;charset=utf-8</mime-type>
</mime-mapping>
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" useBodyEncodingForURI="true" URIncoding="UTF-8"/> 红色就是加入的部分,可以使get/post方式的编码一致。 以防万一,可以在文件conf/web.xml中修改: <mime-mapping>
<extension>htm</extension>
<mime-type>text/html;charset=utf-8</mime-type>
</mime-mapping>
<mime-mapping>
<extension>html</extension>
<mime-type>text/html;charset=utf-8</mime-type>
</mime-mapping>
相关阅读 更多 +