title: How to read JavaScript response from a URL in java
body: <p>I need to write a simple java function that takes a URL and processes the response which is in  JavaScript, I tried using HttpUrlConnection, but it could not. Is there any java library for handling javascript response?</p>
  
  <p>thanks.</p>
  
  <p>EDIT: My code: </p>
  
  <pre><code>Url url = new url("https://login.live.com/oauth20_authorize.srf");
  HttpURLConnection con = (HttpURLConnection) url.openConnection();
  BufferedReader reader = new BufferedReader( new InputStreamReader(url.openStream()));
  while(reader.readLine()!=null){
  System.out.println(reader.readLine());
  </code></pre>
  
  <p>Response:</p>
  
  <pre><code>&lt;html dir="..... Windows Live ID requires JavaScript to sign in. This web browser either does not support JavaScript, or scripts are being blocked......&lt;body onload="evt_LoginHostMobile_onload(event);"&gt;
  </code></pre>
  
  <p>But I want to read those javascript response. Is it possible in java? </p>