我在 android 中使用 HttpClient 发送 post 请求:
HttpClient client = new DefaultHttpClient();
HttpPost request = new HttpPost(hostNameCollection);
StringEntity se = new StringEntity(jsonObj.toString());
request.setHeader("Accept", "application/json");
request.setHeader("Content-type", "application/json");
request.setEntity(se);
HttpResponse response = client.execute(request);
Log.v("HttpLogClient.logJSONObject", "wyslano JSON");
而且我不知道如何在我的 Java EE servlet 上接收 JSON 对象。