From: markt Date: Mon, 12 Oct 2009 17:28:49 +0000 (+0000) Subject: Add an explicit test for JSPs. Grails - that is using a variant of this - seems to... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=9321c774a6f0fed5d628e6832b8b1891afb27780;p=tomcat7.0 Add an explicit test for JSPs. Grails - that is using a variant of this - seems to have issues with JSPs. Looks OK here. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@824432 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/test/org/apache/catalina/startup/TestTomcat.java b/test/org/apache/catalina/startup/TestTomcat.java index 9bae9d49c..98b4c01b1 100644 --- a/test/org/apache/catalina/startup/TestTomcat.java +++ b/test/org/apache/catalina/startup/TestTomcat.java @@ -137,6 +137,21 @@ public class TestTomcat extends TestTomcatBase { assertTrue(res.toString().indexOf("

Hello World!

") > 0); } + public void testJsps() throws Exception { + Tomcat tomcat = getTomcatInstance(); + + File appDir = + new File("output/build/webapps/examples"); + // app dir is relative to server home + tomcat.addWebapp(null, "/examples", appDir.getAbsolutePath()); + + tomcat.start(); + + ByteChunk res = getUrl("http://localhost:" + getPort() + + "/examples/jsp/jsp2/el/basic-arithmetic.jsp"); + assertTrue(res.toString().indexOf("${(1==2) ? 3 : 4}") > 0); + } + public void testLaunchTime() throws Exception { Tomcat tomcat = getTomcatInstance(); long t0 = System.currentTimeMillis();