Address: http://www.blogjava.net/wonderer/archive/2007/10/25/155980.html
Recently, I was developing a testing system and encountered the request. getparameter garbled problem. After discussing with Lin Bin, I still think the old method works.
If it is post, you can set the filter method to solve the problem.
If it is a get or hyperlink, it was previously set by setting the tomcat configuration file server. XML to solve, but this is not good, not all projects, we can modify the tomcat configuration file on the server. DetailsCodeAs follows:
Connector Port = "8080" maxhttpheadersize = "8192" <br/> maxthreads = "150" minsparethreads = "25" maxsparethreads = "75" <br/> enablelookups = "false" redirectport = "8443" acceptcount = "100" <br/> connectiontimeout = "20000" disableuploadtimeout = "true" uriencoding = "GBK"/>
I still think the old method works, but it is a little troublesome:
String carbland = new string (request. getparameter ("carbland"). getbytes ("ISO8859-1"), "UTF-8 ");