Pessoal estou com dúvida de como eu recebo um JSONObject em um Servlet?
Eu faço esse Post para um Servlet
JSONObject jsonObj = new JSONObject();
jsonObj.put("username", username);
jsonObj.put("apikey", apikey);
// Create the POST object and add the parameters
HttpPost httpPost = new HttpPost(url);
StringEntity entity = new StringEntity(jsonObj.toString(), HTTP.UTF_8);
entity.setContentType("application/json");
httpPost.setEntity(entity);
HttpClient client = new DefaultHttpClient();
HttpResponse response = client.execute(httpPost);
Como eu receberia esse Post lá no Servlet?
O request.getParameter() não funciona…
Espero ajuda de alguem, obrigado pela atenção