01-"Ideas"
As we all know, if the request of post can be configured in Web. XML org.springframework.web.filter.CharacterEncodingFilter way to solve the garbled problem,
But the Get method has to request that the filter is not set to the desired encoding. Only get the request path to think about how to solve the coding problem.
02-"Workaround 01-Code Resolution"
String Des=new string (testname.getbytes ("Iso-8858-1"), "Utf-8");
TestName: Incoming Get parameters
Des: Converts the encoded value
03-"Workaround 02-Set the server request encoding method"
Take Tomcat for example:
Set conf/server.xml-
<connector port= "8080" protocol= "http/1.1"
connectiontimeout= "20000"
redirectport= "8443"/>
Change to------->
<connector port= "8080" protocol= "http/1.1"
connectiontimeout= "20000"
Redirectport= "8443" uriencoding= "UTF-8" />
Springmvc Troubleshooting Get method Request garbled < ALL Help >