html中引用了post方法,輸出出現亂碼問題

解決方案:
1.直接改成get方法(tomcat要在8以上)
2.擷取參數前,設定request編碼
request.setCharacterEncoding("utf-8");
在前面設定編碼就可以也都是中文了
設定成功
html中引用了post方法,輸出出現亂碼問題
request.setCharacterEncoding("utf-8");
在前面設定編碼就可以也都是中文了
設定成功