Hi, I am fixing a bug on an existing code concerning DocumentBuilder.parse. I have the below 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());
I dont understand why i am getting a null value for xmlDoc though I have valid values for theOutput and xmlSource variables. Please help.
thanks!