Author: markt
Date: Mon Oct 12 17:28:49 2009
New Revision: 824432
URL: http://svn.apache.org/viewvc?rev=824432&view=rev
Log:
Add an explicit test for JSPs. Grails - that is using a variant of this - seems
to have issues with JSPs. Looks OK here.
Modified:
tomcat/trunk/test/org/apache/catalina/startup/TestTomcat.java
Modified: tomcat/trunk/test/org/apache/catalina/startup/TestTomcat.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TestTomcat.java?rev=824432&r1=824431&r2=824432&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/startup/TestTomcat.java (original)
+++ tomcat/trunk/test/org/apache/catalina/startup/TestTomcat.java Mon Oct 12
17:28:49 2009
@@ -137,6 +137,21 @@
assertTrue(res.toString().indexOf("<h1>Hello World!</h1>") > 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("<td>${(1==2) ? 3 : 4}</td>") > 0);
+ }
+
public void testLaunchTime() throws Exception {
Tomcat tomcat = getTomcatInstance();
long t0 = System.currentTimeMillis();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]