客户端
userName = view_userName.getText().toString();
password = view_password.getText().toString();
String validateURL="http://42.96.167.153:8080/JsonWeb/LoginCheckServlet?userName="
+ userName + "&password=" + password;
服务端
userName = view_userName.getText().toString();
password = view_password.getText().toString();
String validateURL="http://42.96.167.153:8080/JsonWeb/LoginCheckServlet?userName="
+ userName + "&password=" + password;
System.out.println("用户名"+userName);
显示:用户名:???
------解决方案--------------------
传:
<%=java.net.URLEncoder.encode("中文参数","GB2312")%>
取:
String username=java.net.URLDecoder.decode(request.getParameter("username"),"GB2312");
username= new String(username.getBytes("ISO-8859-1"), "utf-8");