Author: markt Date: Sun Mar 7 11:09:09 2010 New Revision: 919966 URL: http://svn.apache.org/viewvc?rev=919966&view=rev Log: Add a test the EL doesn't work if the web-app is a 2.3 web-app
Added: tomcat/trunk/test/org/apache/jasper/compiler/TestJspConfig.java (with props) tomcat/trunk/test/webapp-2.3/ tomcat/trunk/test/webapp-2.3/WEB-INF/ tomcat/trunk/test/webapp-2.3/WEB-INF/web.xml (with props) tomcat/trunk/test/webapp-2.3/no-el.jsp (with props) Added: tomcat/trunk/test/org/apache/jasper/compiler/TestJspConfig.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/jasper/compiler/TestJspConfig.java?rev=919966&view=auto ============================================================================== --- tomcat/trunk/test/org/apache/jasper/compiler/TestJspConfig.java (added) +++ tomcat/trunk/test/org/apache/jasper/compiler/TestJspConfig.java Sun Mar 7 11:09:09 2010 @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jasper.compiler; + +import java.io.File; + +import org.apache.catalina.startup.Tomcat; +import org.apache.catalina.startup.TomcatBaseTest; +import org.apache.tomcat.util.buf.ByteChunk; + +public class TestJspConfig extends TomcatBaseTest { + + public void testServlet23NoEL() throws Exception { + Tomcat tomcat = getTomcatInstance(); + + File appDir = + new File("test/webapp-2.3"); + // app dir is relative to server home + tomcat.addWebapp(null, "/test", appDir.getAbsolutePath()); + + tomcat.start(); + + ByteChunk res = getUrl("http://localhost:" + getPort() + + "/test/no-el.jsp"); + + String result = res.toString(); + + assertTrue(result.indexOf("<p>00-${'hello world'}</p>") > 0); + } + +} Propchange: tomcat/trunk/test/org/apache/jasper/compiler/TestJspConfig.java ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/trunk/test/webapp-2.3/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/test/webapp-2.3/WEB-INF/web.xml?rev=919966&view=auto ============================================================================== --- tomcat/trunk/test/webapp-2.3/WEB-INF/web.xml (added) +++ tomcat/trunk/test/webapp-2.3/WEB-INF/web.xml Sun Mar 7 11:09:09 2010 @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!DOCTYPE web-app PUBLIC + "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" + "http://java.sun.com/dtd/web-app_2_3.dtd"> +<web-app> + <display-name>Tomcat Servlet 2.3 Tests</display-name> + <description> + Provides a web application used by the Tomcat unit tests to ensure that + Tomcat meets the requirements of the current JSP and Servlet specification + for web applications that declare that they follow version 2.3 of the + Servlet specification and version 1.2 of the JSP specification. This + typically means ensuring that features introduced in later versions of the + specification do not change the behaviour of applications that declared an + earlier version of the specification. + </description> +</web-app> \ No newline at end of file Propchange: tomcat/trunk/test/webapp-2.3/WEB-INF/web.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/trunk/test/webapp-2.3/no-el.jsp URL: http://svn.apache.org/viewvc/tomcat/trunk/test/webapp-2.3/no-el.jsp?rev=919966&view=auto ============================================================================== --- tomcat/trunk/test/webapp-2.3/no-el.jsp (added) +++ tomcat/trunk/test/webapp-2.3/no-el.jsp Sun Mar 7 11:09:09 2010 @@ -0,0 +1,21 @@ +<%-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--%> +<html> + <body> + <p>00-${'hello world'}</p> + </body> +</html> \ No newline at end of file Propchange: tomcat/trunk/test/webapp-2.3/no-el.jsp ------------------------------------------------------------------------------ svn:eol-style = native --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org