DTD: document type definition
method="post" 不乱码,为 get 时乱码
为post 时,不会携带参数
在tomcat6中,我用表单用get方法提交,但如果其中表单参数有中文,提交后接受到的就为就为乱码,
我以前采取的解决方式是打开tomcat的server.xml文件,找到区块,加入如下一行:URIEncoding="utf-8"
- <Connector port= "8080 " protocol= "HTTP/1.1 "
- connectionTimeout= "20000 "
- redirectPort= "8443 " URIEncoding="utf-8"/>