Index: test/org/apache/catalina/startup/TestTomcat.java =================================================================== --- test/org/apache/catalina/startup/TestTomcat.java (revision 1229025) +++ test/org/apache/catalina/startup/TestTomcat.java (working copy) @@ -240,6 +240,28 @@ } @Test + public void testTwoWebapps() throws Exception { + Tomcat tomcat = getTomcatInstance(); + + File appDir = new File(getBuildDirectory(), "webapps/examples"); + // app dir is relative to server home + tomcat.addWebapp(null, "/examples", appDir.getAbsolutePath()); + + File appDir2 = new File(getBuildDirectory(), "webapps/docs"); + tomcat.addWebapp(null, "/docs", appDir2.getAbsolutePath()); + + tomcat.start(); + + ByteChunk res = getUrl("http://localhost:" + getPort() + + "/examples/servlets/servlet/HelloWorldExample"); + assertTrue(res.toString().indexOf("

Hello World!

") > 0); + + res = getUrl("http://localhost:" + getPort() + + "/docs/index.html"); + assertTrue(res.toString().indexOf("Apache Tomcat") > 0); + } + + @Test public void testJsps() throws Exception { Tomcat tomcat = getTomcatInstance();