From 9321c774a6f0fed5d628e6832b8b1891afb27780 Mon Sep 17 00:00:00 2001 From: markt Date: Mon, 12 Oct 2009 17:28:49 +0000 Subject: [PATCH] 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 --- test/org/apache/catalina/startup/TestTomcat.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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(); -- 2.11.0