Lines 240-245
Link Here
|
240 |
} |
240 |
} |
241 |
|
241 |
|
242 |
@Test |
242 |
@Test |
|
|
243 |
public void testTwoWebapps() throws Exception { |
244 |
Tomcat tomcat = getTomcatInstance(); |
245 |
|
246 |
File appDir = new File(getBuildDirectory(), "webapps/examples"); |
247 |
// app dir is relative to server home |
248 |
tomcat.addWebapp(null, "/examples", appDir.getAbsolutePath()); |
249 |
|
250 |
File appDir2 = new File(getBuildDirectory(), "webapps/docs"); |
251 |
tomcat.addWebapp(null, "/docs", appDir2.getAbsolutePath()); |
252 |
|
253 |
tomcat.start(); |
254 |
|
255 |
ByteChunk res = getUrl("http://localhost:" + getPort() + |
256 |
"/examples/servlets/servlet/HelloWorldExample"); |
257 |
assertTrue(res.toString().indexOf("<h1>Hello World!</h1>") > 0); |
258 |
|
259 |
res = getUrl("http://localhost:" + getPort() + |
260 |
"/docs/index.html"); |
261 |
assertTrue(res.toString().indexOf("<title>Apache Tomcat") > 0); |
262 |
} |
263 |
|
264 |
@Test |
243 |
public void testJsps() throws Exception { |
265 |
public void testJsps() throws Exception { |
244 |
Tomcat tomcat = getTomcatInstance(); |
266 |
Tomcat tomcat = getTomcatInstance(); |
245 |
|
267 |
|