2. html表单提交servlet出现的乱码问题的解决?

解决办法:

        将tomcat安装目录的conf目录下的servlet.xml的

    <Connector port="8080" protocol="HTTP/1.1"

               connectionTimeout="20000"

               redirectPort="8443" />

改为

<Connector port="8080" protocol="HTTP/1.1"

               connectionTimeout="20000"

               redirectPort="8443" URIEncoding="gbk" />

(即,添加URIEncoding="gbk"到Connector元素中)

你可能感兴趣的:(2. html表单提交servlet出现的乱码问题的解决?)