title: DocumentBuilder.parse(InputStream) returns null
body: <p>I am fixing a bug on an existing code concerning DocumentBuilder.parse. I have the below code: </p>
  
  <pre><code> String theOutput;
      theOutput = response.encodeURL(prefix + "/include/sampleForConversion.jsp?" + request.getQueryString();
      StreamSource xmlSource = new StreamSource(new URL(theOutput).openStream(), "http://sampleApps.net/static/dataDef1.1.dtd");                                         
      Document xmlDoc = dBuilder.parse(xmlSource.getInputStream());
  </code></pre>
  
  <p>I dont understand why i am getting a null value for xmlDoc though I have valid values for theOutput and xmlSource variables. Please help. </p>
  
  <p>thanks!</p>