File appDir = new File("test/webapp");
StandardContext ctxt = (StandardContext) tomcat.addWebapp(null, "/test",
appDir.getAbsolutePath());
ctxt.setReplaceWelcomeFiles(true);
ctxt.addWelcomeFile("index.jsp");
// Mapping for *.do is defined in web.xml
ctxt.addWelcomeFile("index.do");
// Simulate STRICT_SERVLET_COMPLIANCE
ctxt.setResourceOnlyServlets("");