Click draft box ----> (select a time period) to query
GET/hnmms/seachsms. do? Method = getsmsbytime & starttime = & endtime = & boxnum = 0 & smssender = http/1.1
HOST: localhost: 8077
User-Agent: Mozilla/5.0 (windows; U; Windows NT 5.1; ZH-CN; RV: 1.9.2.13) Gecko/20101203 Firefox/3.6.13
Accept: Application/JSON, text/JavaScript ,*/*
Accept-language: ZH-CN, ZH; q = 0.5
Accept-encoding: gzip, deflate
Accept-charset: gb2312, UTF-8; q = 0.7, *; q = 0.7
Keep-alive: 115
Connection: keep-alive
X-requested-with: XMLHttpRequest
Referer: http: // localhost: 8077/hnmms/New/index. jsp
COOKIE: JSESSIONID = 9ef8124bb8f707ca027fda-b1803269b
-----> Garbled Information)
HTTP/1.1 200 OK
Server: APACHE-Coyote/1.1
Content-Type: text/html; charset = UTF-8
Transfer-encoding: chunked
Date: Tue, 08 mar 2011 09:16:29 GMT
BF
[{"Smsid": 6, "smstopic": "zengxi", "smscontent": "", "smsids": "", "smstype ":"", "smssender": "", "smsreceivephone": "32432432424", "smsreceiver": "fear", "smstime": "", "smsstatus": 0}]
0
Background log:
--> Conn: COM. MySQL. JDBC. Connection @ 11e98f4
Select * From a_sms where smstime between '2017-03-01 'and '2017-03-09' and smsstatus = 0 and smssender = ''order by smsid DESC
--> Release connn over
[{"Smsid": 6, "smstopic": "zengxi", "smscontent": "", "smsids": "", "smstype ":"", "smssender": "", "smsreceivephone": "32432432424", "smsreceiver": "hier", "smstime": "", "smsstatus": 0}]
The solution is: three encoding is unified and all are handled in UTF-8.
Set the project first
Set the -- JSP encoding format, or delete it. modify it in notepad and save it as JSP UTF-8.
When processing is finally accepted, set the next character
Request. setcharacterencoding ("UTF-8 ");
Response. setcharacterencoding ("UTF-8 ");
Last OK
Record it. I think this is the purpose of the Interceptor. There are too many things to learn. J2EE is not simple.