这里是Android端的代码:
List<NameValuePair> list=new ArrayList<NameValuePair>();
JSONObject jso=new JSONObject();
jso.put("name", "abc大家好123");
list.add(new BasicNameValuePair("info", jso.toString()));
httpPost.setEntity(new UrlEncodedFormEntity(list, "GBK"));
HttpClient client = new DefaultHttpClient();
HttpResponse response = client.execute(httpPost);
Web端用的是Struts2。测试网络已经连通,而且Android端能收到Web端的json数据,但是上面这个json数据不知道怎么在web端获取到,求大神指点一二!
------解决方案--------------------
一样的呗,你用request.getParamXXXX("参数id");