request.setCharacterEncoding("utf-8");
這行代碼更新了??? 現(xiàn)在沒有出現(xiàn)中文亂碼了 request.setCharacterEncoding("utf-8");//解決中文亂碼問題,以前無法解決URL傳遞中文出現(xiàn)的亂碼問題
這行代碼更新了??? 現(xiàn)在沒有出現(xiàn)中文亂碼了 request.setCharacterEncoding("utf-8");//解決中文亂碼問題,以前無法解決URL傳遞中文出現(xiàn)的亂碼問題
2017-08-02
舉報
2017-08-02
? ? <Connector port="8080" protocol="HTTP/1.1"
? ? ? ? ? ? ? ?connectionTimeout="20000"
? ? ? ? ? ? ? ?redirectPort="8443"
? ? ? URIEncoding="UTF-8"
?/>
這個地方在你要在Tomcat目錄下有個server.xml文件,打開搜索Connector,里面有很多,
選擇帶自己所用端口號的那一行,在那一行添加 URIEncoding="UTF-8",即可。