Author: markt Date: Tue May 25 14:20:16 2010 New Revision: 948055 URL: http://svn.apache.org/viewvc?rev=948055&view=rev Log: Add a test case for https://issues.apache.org/bugzilla/show_bug.cgi?id=49196 Patch to follow shortly
Added: tomcat/trunk/test/javax/ tomcat/trunk/test/javax/servlet/ tomcat/trunk/test/javax/servlet/jsp/ tomcat/trunk/test/javax/servlet/jsp/TestPageContext.java (with props) tomcat/trunk/test/webapp-3.0/bug49196.jsp (with props) Added: tomcat/trunk/test/javax/servlet/jsp/TestPageContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/javax/servlet/jsp/TestPageContext.java?rev=948055&view=auto ============================================================================== --- tomcat/trunk/test/javax/servlet/jsp/TestPageContext.java (added) +++ tomcat/trunk/test/javax/servlet/jsp/TestPageContext.java Tue May 25 14:20:16 2010 @@ -0,0 +1,43 @@ +/* + * 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 javax.servlet.jsp; + +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 TestPageContext extends TomcatBaseTest { + + public void testBug49196() throws Exception { + Tomcat tomcat = getTomcatInstance(); + + File appDir = new File("test/webapp-3.0"); + // app dir is relative to server home + tomcat.addWebapp(null, "/test", appDir.getAbsolutePath()); + + tomcat.start(); + + ByteChunk res = getUrl("http://localhost:" + getPort() + + "/test/bug49196.jsp"); + + String result = res.toString(); + assertTrue(result.contains("OK")); + } +} Propchange: tomcat/trunk/test/javax/servlet/jsp/TestPageContext.java ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/trunk/test/webapp-3.0/bug49196.jsp URL: http://svn.apache.org/viewvc/tomcat/trunk/test/webapp-3.0/bug49196.jsp?rev=948055&view=auto ============================================================================== --- tomcat/trunk/test/webapp-3.0/bug49196.jsp (added) +++ tomcat/trunk/test/webapp-3.0/bug49196.jsp Tue May 25 14:20:16 2010 @@ -0,0 +1,26 @@ +<%-- + 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. +--%> +<% +// As nonsensical as this is, in't shouldn't throw an NPE +pageContext.getErrorData(); +%> +<html> + <head><title>Bug 49196 test case</title></head> + <body> + <p>OK</p> + </body> +</html> \ No newline at end of file Propchange: tomcat/trunk/test/webapp-3.0/bug49196.jsp ------------------------------------------------------------------------------ svn:eol-style = native --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org