Author: markt Date: Sun Jan 31 23:57:56 2010 New Revision: 905142 URL: http://svn.apache.org/viewvc?rev=905142&view=rev Log: Add minimal version of test case provided by 'agharta' in for https://issues.apache.org/bugzilla/show_bug.cgi?id=48616
Added: tomcat/trunk/test/webapp/WEB-INF/bugs.tld (with props) tomcat/trunk/test/webapp/bug48616.jsp (with props) Modified: tomcat/trunk/test/org/apache/jasper/compiler/TestScriptingVariabler.java Modified: tomcat/trunk/test/org/apache/jasper/compiler/TestScriptingVariabler.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/jasper/compiler/TestScriptingVariabler.java?rev=905142&r1=905141&r2=905142&view=diff ============================================================================== --- tomcat/trunk/test/org/apache/jasper/compiler/TestScriptingVariabler.java (original) +++ tomcat/trunk/test/org/apache/jasper/compiler/TestScriptingVariabler.java Sun Jan 31 23:57:56 2010 @@ -20,6 +20,11 @@ import java.io.File; import java.io.IOException; +import javax.servlet.jsp.tagext.TagData; +import javax.servlet.jsp.tagext.TagExtraInfo; +import javax.servlet.jsp.tagext.TagSupport; +import javax.servlet.jsp.tagext.VariableInfo; + import org.apache.catalina.startup.Tomcat; import org.apache.catalina.startup.TomcatBaseTest; @@ -45,4 +50,47 @@ // Should not fail assertNull(e); } + + public static class Bug48616aTag extends TagSupport { + private static final long serialVersionUID = 1L; + } + + public static class Bug48616bTag extends TagSupport { + private static final long serialVersionUID = 1L; + } + + public static class Bug48616bTei extends TagExtraInfo { + /** + * Return information about the scripting variables to be created. + */ + @Override + public VariableInfo[] getVariableInfo(TagData data) { + return new VariableInfo[] { + new VariableInfo("Test", "java.lang.String", true, + VariableInfo.AT_END) + }; + } + } + + public void testBug48616() throws Exception { + Tomcat tomcat = getTomcatInstance(); + + File appDir = + new File("test/webapp"); + // app dir is relative to server home + tomcat.addWebapp(null, "/test", appDir.getAbsolutePath()); + + tomcat.start(); + + Exception e = null; + try { + getUrl("http://localhost:" + getPort() + "/test/bug48616.jsp"); + } catch (IOException ioe) { + e = ioe; + } + + // Should not fail + assertNull(e); + } + } Added: tomcat/trunk/test/webapp/WEB-INF/bugs.tld URL: http://svn.apache.org/viewvc/tomcat/trunk/test/webapp/WEB-INF/bugs.tld?rev=905142&view=auto ============================================================================== --- tomcat/trunk/test/webapp/WEB-INF/bugs.tld (added) +++ tomcat/trunk/test/webapp/WEB-INF/bugs.tld Sun Jan 31 23:57:56 2010 @@ -0,0 +1,38 @@ +<?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. +--><taglib xmlns="http://java.sun.com/xml/ns/javaee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee + http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd" + version="2.1"> + <tlib-version>1.0</tlib-version> + <short-name>BugTags</short-name> + <uri>http://tomcat.apache.org/bugs</uri> + + <tag> + <name>Bug46816a</name> + <tag-class>org.apache.jasper.compiler.TestScriptingVariabler$Bug48616aTag</tag-class> + <body-content>JSP</body-content> + </tag> + + <tag> + <name>Bug48616b</name> + <tag-class>org.apache.jasper.compiler.TestScriptingVariabler$Bug48616bTag</tag-class> + <tei-class>org.apache.jasper.compiler.TestScriptingVariabler$Bug48616bTei</tei-class> + <body-content>JSP</body-content> + </tag> +</taglib> \ No newline at end of file Propchange: tomcat/trunk/test/webapp/WEB-INF/bugs.tld ------------------------------------------------------------------------------ svn:eol-style = native Propchange: tomcat/trunk/test/webapp/WEB-INF/bugs.tld ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision Added: tomcat/trunk/test/webapp/bug48616.jsp URL: http://svn.apache.org/viewvc/tomcat/trunk/test/webapp/bug48616.jsp?rev=905142&view=auto ============================================================================== --- tomcat/trunk/test/webapp/bug48616.jsp (added) +++ tomcat/trunk/test/webapp/bug48616.jsp Sun Jan 31 23:57:56 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. +--%> +<%@ taglib prefix="bugs" uri="http://tomcat.apache.org/bugs" %> +<bugs:Bug48616b /> +<bugs:Bug46816a> + <bugs:Bug48616b /> +</bugs:Bug46816a> \ No newline at end of file Propchange: tomcat/trunk/test/webapp/bug48616.jsp ------------------------------------------------------------------------------ svn:eol-style = native Propchange: tomcat/trunk/test/webapp/bug48616.jsp ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org