服务器:Tomcat 6.0
常用解决方法有以下3种:
1、在所有的.jsp文件的首行加上<%@ page contentType="text/html;charset=GBK"%>或者<%@ page language="java" pageEncoding="GBK"%>
2、在 <head> </head>中的首行加上 <meta http-equiv="Content-Type" content="text/html; charset=GBK">,如下:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title></title>
</head>
3、配置Tomcat 6.0\conf\server.xml
<Connector port="8080"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
debug="0" connectionTimeout="20000" useBodyEncodingForURI="true"
disableUploadTimeout="true" />