Address: Http://hi.baidu.com/comasp/blog/item/e13e928b4eeb59d2fc1f10d8.html
I encountered this exception when passing parameters through Ajax. After finding something online for N days, I still did not find the answer. It turns out that I have not found any errors caused by escape. I wrote it like this.
VaR url = "B. jsp? Name = "+ escape (u_name );
Server get:
String name = request. getparameter ("name ");
Name = new string (name. getbytes ("iso-8859-1 "));
System. Out. println (name );
The following error is reported: org. Apache. tomcat. util. http. Parameters processparameters.
Warning parameters:Character Decoding Failed.Parameter Skipped.
Java. Io. charconversionexception: ishexdigit.
I know it's a String Conversion exception, but I don't know how to fix it.
Later I heard that it was an escapse problem, so I began to look for information. Finally solved the problem.
Change the URL first:
VaR url = "B. jsp? Name = "+ u_name;
Url = encodeuri (URL );
Url = encodeuri (URL); // You cannot write one. If you write one, it is ???? .
// Write two, and output % DF % A4.
Server get:
string name = request. getparameter ("name");
name = java.net. urldecoder. decode (name, "UTF-8"); // This sentence must be, because if not written //, the encoding is % E5 % a6 % 88% system. out. println (name);