protected void initServlet(String webXml) throws Exception {
    ServletRunner runner = new ServletRunner(new File(srcdir, webXml), "");
    client = runner.newClient();
    ic = client.newInvocation("http://localhost:8080/app1");

    originalServletContext = ic.getServlet().getServletConfig().getServletContext();
    servletContext = createServletContextWrapper(true);
    request = ic.getRequest();
    response = ic.getResponse();
  }
 protected String doTest() throws IOException, SAXException {
   ServletUnitClient sc = sr.newClient();
   WebRequest request = new GetMethodWebRequest("http://incongru.net/empty");
   WebResponse response = sc.getResponse(request);
   return response.getText();
 }
 protected void initTest(String ctxScope, String sesScope, String reqScope, FilterDef[] filters)
     throws IOException, SAXException {
   InputStream webXml = getWebXml(filters, ctxScope, sesScope, reqScope);
   sr = new ServletRunner(webXml);
   sr.registerServlet("empty", EmptyServlet.class.getName());
 }