title: HTTP POST is not working from Java
body: <p>I am trying to do an http post. Same code was working.But now it is not hitting my servlet now, but giving http response code 200. From browser same url is hitting the servlet. Is there anything that restricting my post?. Please help me on it. Sorry for bad english.</p>
  
  <pre><code>int timeout=3000;
  String url="http://localhost:8020/WiCodeDynamic/WiCode?json=";
  String requestUrl="{\"vspCredentials\":{\"id\":\"TET\",\"password\":\"test\"}}";
  URL x = new URL(url);
  HttpURLConnection connection =(HttpURLConnection)x.openConnection();
  
  connection.setRequestMethod("POST");
  //;charset=utf-8
  connection.setRequestProperty("Content-type","application/json");
  connection.setDoOutput(true);
  connection.setConnectTimeout(timeout);
  
  BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(connection.getOutputStream()));
  bw.write(requestUrl);
  bw.flush();
  
  int resp_code = connection.getResponseCode();
  String resp_msg = connection.getResponseMessage();
  
  System.out.println("resp_code="+resp_code);
  System.out.println("resp_msg="+resp_msg);
  </code></pre>
  
  <p>brs,</p>