Recently I encountered a request. getparameter garbled problem. If it is post, you can set the filter method to solve it. 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:
1: Connector Port = "8080" maxhttpheadersize = "8192" 2: maxthreads = "150" minsparethreads = "25" maxsparethreads = "75" 3: enablelookups = "false" redirectport = "8443" acceptcount = "100" 4: connectiontimeout = "20000" disableuploadtimeout = "true" uriencoding = "GBK"/>
Servlet:
String bz_name = new string (request. getparameter ("bz_name "). getbytes ("ISO8859-1"), "UTF-8"); system. out. println ("request. getparameter (bz_name ). trim (): "+ bz_name); Request. setattribute ("bz_name", bz_name );