title: HttpURLConnection setReadTimeOut() was not working as expected
body: <p>I am using HttpURLConnection to connect to the jsp page and configured the readTimeout as 5s.</p>
  
  <p>And delayed the jsp page execution by Thread.Sleep() for 10s.</p>
  
  <p>But don't get the timeout exception instead connection waits for 10s to get the response.</p>
  
  <pre><code>HttpURLConnection con = (HttpURLConnection)jspUrl.openConnection();
  con.setReadTimeout(5000);
  con.connect();
  </code></pre>
  
  <p>Jsp Page content is shown below.</p>
  
  <pre><code>&lt;%
      Thread.sleep(10000);
      JSONArray arrayObj = new JSONArray();
      arrayObj.put(123);
      out.println(arrayObj);  
  %&gt;
  </code></pre>