/** * Constructor which expects an input stream containing the web.xml for the application. * @param webXML * @param contextPath * @throws IOException * @throws SAXException */ public ServletRunner( InputStream webXML, String contextPath ) throws IOException, SAXException { InputSource inputSource=new InputSource( webXML ); Document doc=HttpUnitUtils.parse(inputSource); try { _application = new WebApplication( doc, contextPath ); completeInitialization( contextPath ); } catch (java.net.MalformedURLException mue) { throw mue; } }
/** * Constructor which expects an input stream containing the web.xml for the application. * @param webXML * @param contextPath * @throws IOException * @throws SAXException */ public ServletRunner( InputStream webXML, String contextPath ) throws IOException, SAXException { InputSource inputSource=new InputSource( webXML ); Document doc=HttpUnitUtils.parse(inputSource); try { _application = new WebApplication( doc, contextPath ); completeInitialization( contextPath ); } catch (java.net.MalformedURLException mue) { throw mue; } }
/** * Constructor which expects an input stream containing the web.xml for the application. * @param webXML * @param contextPath * @throws IOException * @throws SAXException */ public ServletRunner( InputStream webXML, String contextPath ) throws IOException, SAXException { InputSource inputSource=new InputSource( webXML ); Document doc=HttpUnitUtils.parse(inputSource); try { _application = new WebApplication( doc, contextPath ); completeInitialization( contextPath ); } catch (java.net.MalformedURLException mue) { throw mue; } }
/** * Returns a copy of the domain object model tree associated with this response. * If the response is HTML, it will use a special parser which can transform HTML into an XML DOM. * @exception SAXException thrown if there is an error parsing the response. **/ public Document getDOM() throws SAXException { if (isHTML()) { return (Document) getReceivedPage().getDOM(); } else { try { return HttpUnitUtils.parse( new InputSource( new StringReader( getText() ) ) ); } catch (IOException e) { throw new SAXException( e ); } } }
/** * Returns a copy of the domain object model tree associated with this response. * If the response is HTML, it will use a special parser which can transform HTML into an XML DOM. * @exception SAXException thrown if there is an error parsing the response. **/ public Document getDOM() throws SAXException { if (isHTML()) { return (Document) getReceivedPage().getDOM(); } else { try { return HttpUnitUtils.parse( new InputSource( new StringReader( getText() ) ) ); } catch (IOException e) { throw new SAXException( e ); } } }