This commit is contained in:
2024-11-30 19:03:49 +08:00
commit 1e6763c160
3806 changed files with 737676 additions and 0 deletions

1
test/webapp/404.html Normal file
View File

@@ -0,0 +1 @@
It is 404.html

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
version="2.0">
<tlib-version>1.0</tlib-version>
<short-name>bug53545</short-name>
<tag>
<name>test</name>
<tag-class>org.apache.tomcat.unittest.tags.Bug53545</tag-class>
<body-content>scriptless</body-content>
</tag>
</taglib>

View File

@@ -0,0 +1,87 @@
<?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>
<tag>
<name>Bug48701a</name>
<tag-class>org.apache.jasper.compiler.TestGenerator$Bug48701</tag-class>
<tei-class>org.apache.jasper.compiler.TestGenerator$Bug48701TEI</tei-class>
<body-content>empty</body-content>
</tag>
<tag>
<name>Bug48701b</name>
<tag-class>org.apache.jasper.compiler.TestGenerator$Bug48701</tag-class>
<body-content>empty</body-content>
<variable>
<name-given>now</name-given>
<variable-class>org.apache.jasper.compiler.TestGenerator.Bean</variable-class>
<scope>AT_END</scope>
</variable>
</tag>
<tag>
<name>Bug48701c</name>
<tag-class>org.apache.jasper.compiler.TestGenerator$Bug48701</tag-class>
<body-content>empty</body-content>
<attribute>
<name>beanName</name>
<type>java.lang.String</type>
</attribute>
<variable>
<name-from-attribute>beanName</name-from-attribute>
<variable-class>org.apache.jasper.compiler.TestGenerator.Bean</variable-class>
<scope>AT_END</scope>
</variable>
</tag>
<tag>
<name>Bug56529</name>
<tag-class>org.apache.jasper.compiler.TestGenerator$Bug56529</tag-class>
<body-content>JSP</body-content>
<attribute>
<name>attribute1</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>attribute2</name>
<required>true</required>
</attribute>
</tag>
<function>
<name>bug49555</name>
<function-class>org.apache.el.TesterFunctions$Inner$Class</function-class>
<function-signature>java.lang.String bug49555()</function-signature>
</function>
</taglib>

View File

@@ -0,0 +1,37 @@
<?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 taglib
PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
"http://java.sun.com/dtd/web-jsptaglibrary_1_1.dtd">
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>Tags11</shortname>
<uri>http://tomcat.apache.org/bug55807</uri>
<tag>
<name>Echo</name>
<tagclass>org.apache.jasper.compiler.TestValidator$Echo</tagclass>
<bodycontent>empty</bodycontent>
<attribute>
<name>echo</name>
<required>yes</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
</taglib>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<tag-plugins>
<tag-plugin>
<tag-class>org.apache.jasper.compiler.TesterTag</tag-class>
<plugin-class>org.apache.jasper.compiler.TesterTagPlugin</plugin-class>
</tag-plugin>
</tag-plugins>

View File

@@ -0,0 +1,24 @@
/*
* 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.tomcat;
/**
* Contains no functionality since it is only used to test the code source
* assigned to the class.
*/
public class Bug58096 {
}

View File

@@ -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>OK</p>
</body>
</html>

View File

@@ -0,0 +1,22 @@
<%--
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.
--%>
<%@page session="false" %>
<html>
<body>
<p>ERROR</p>
</body>
</html>

Binary file not shown.

View File

@@ -0,0 +1,18 @@
<%--
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.
--%>
<%@ variable name-given="X" scope="AT_END" %>
<jsp:doBody/>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
<jsp:directive.tag body-content="scriptless" />
<jsp:directive.attribute name="expr" type="java.lang.String" rtexprvalue="true"/>
<jsp:directive.attribute name="noexpr" type="java.lang.String" rtexprvalue="false"/>
<jsp:directive.attribute name="fragment" fragment="true" />
<jsp:text>${expr}${noexpr}</jsp:text>
<jsp:invoke fragment="fragment" />
<jsp:doBody />
</jsp:root>

View File

@@ -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.
--%><%@ tag import="java.util.List" import="java.util.ArrayList"%><%@
tag body-content="empty" %><%
// Make sure the imports above do work
List<String> l = new ArrayList<String>();
l.add("OK");
%><p><%=l.get(0)%></p>

View File

@@ -0,0 +1,20 @@
<%--
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.
--%><%@ tag %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ tag body-content="empty" %>
<c:set var="test" value="OK" />
<p><c:out value="${test}"/></p>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
<jsp:directive.tag body-content="scriptless" />
<a href="#" onclick="window.alert(&quot;1${'foo'}1&lt;&amp;&gt;&quot;)">foo</a>
<a href="#" onclick="window.alert(&quot;2bar2&lt;&amp;&gt;&quot;)">bar</a>
<a href="#" onclick="window.alert(&quot;3${text}3&quot;)">foo</a>
<a href="#" onclick="window.alert(&quot;4${'&amp;'}4&quot;)">foo</a>
<a href="#" onclick="window.alert(&quot;5${'&amp;apos;'}5&quot;)">foo</a>
<jsp:doBody />
</jsp:root>

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<jsp:directive.tag body-content="empty" dynamic-attributes="attMap" />
<c:forEach var="e" items="${attMap}">
<jsp:text>[${e.key}]: [${e.value}]</jsp:text>
</c:forEach>
</jsp:root>

View File

@@ -0,0 +1,32 @@
<%--
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="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:catch var="error">
<jsp:doBody/>
</c:catch>
<c:if test="${error != null}">
<p>PASS<br/>
Error detected<br/>
The exception is : ${error} <br />
The message is: ${error.message}</p>
</c:if>
<c:if test="${error == null}">
<p>FAIL<br/>
Error not detected</p>
</c:if>

View File

@@ -0,0 +1,20 @@
<%--
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.
--%>
<%@tag import="java.math.*, java.util.Collections" %>
<p>00-${DispatcherType.ASYNC}</p>
<p>01-${RoundingMode.HALF_UP}</p>
<p>02-${Collections.EMPTY_LIST.stream().count()}</p>

View File

@@ -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.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ attribute name="foo" required="true" %>
<%@ attribute name="bar" %>
<%@ attribute name="baz" %>
<div>
<div>foo: ${foo.toString()}</div>
<div>bar: ${bar.toString()}</div>
<div>baz: ${baz.toString()}</div>
</div>

View File

@@ -0,0 +1,17 @@
<%--
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.
--%><%@ tag %><%@ attribute name="echo" deferredValue="true" %><%@
tag body-content="empty" %><p>${echo}</p>

View File

@@ -0,0 +1,20 @@
<%--
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.
--%>
<%@ tag %><%@
attribute name="echo" type="java.lang.Double"%><%@
attribute name="index" type="java.lang.String" %><%@
tag body-content="empty" %><p>${index}-${echo}</p>

View File

@@ -0,0 +1,20 @@
<%--
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.
--%>
<%@ tag %><%@
attribute name="echo" type="java.lang.Long"%><%@
attribute name="index" type="java.lang.String" %><%@
tag body-content="empty" %><p>${index}-${echo}</p>

View File

@@ -0,0 +1,19 @@
<%--
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.
--%>
<%@ tag%><%@
attribute name="echo" type="java.lang.String" rtexprvalue="false"
%><%@ tag body-content="empty" %><p>${echo}</p>

View File

@@ -0,0 +1,19 @@
<%--
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.
--%><%@ tag %><%@
attribute name="echo" type="java.lang.String"%><%@
attribute name="dummy" type="java.lang.String" required="false"%><%@
tag body-content="empty" %><p>${echo}</p>

View File

@@ -0,0 +1,23 @@
<?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">
</taglib>

View File

@@ -0,0 +1,64 @@
<?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>TesterFunctions</short-name>
<uri>http://tomcat.apache.org/testerFunctions</uri>
<function>
<name>trim</name>
<function-class>org.apache.el.TesterFunctions</function-class>
<function-signature>
java.lang.String trim(java.lang.String)
</function-signature>
</function>
<function>
<name>concat</name>
<function-class>org.apache.el.TesterFunctions</function-class>
<function-signature>
java.lang.String concat(java.lang.String[])
</function-signature>
</function>
<function>
<name>toArray</name>
<function-class>org.apache.el.TesterFunctions</function-class>
<!-- Do not change whitespace in signature below. It is used to test for
correctness in o.a.jasper.compiler.Validator. -->
<function-signature>
java.lang.String toArray(java.lang.String,
java.lang.String)
</function-signature>
</function>
<function>
<name>toArrayB</name>
<function-class>org.apache.el.TesterFunctions</function-class>
<!-- Do not change whitespace in signature below. It is used to test for
correctness in o.a.jasper.compiler.Validator. -->
<function-signature>
java.lang.String toArray (java.lang.String,java.lang.String)
</function-signature>
</function>
</taglib>

174
test/webapp/WEB-INF/web.xml Normal file
View File

@@ -0,0 +1,174 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1"
metadata-complete="true">
<display-name>Tomcat Test Application</display-name>
<description>
Used as part of the Tomcat unit tests when a full web application is
required.
</description>
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>fork</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>xpoweredBy</param-name>
<param-value>false</param-value>
</init-param>
<!-- Required by /jsp/tagFileInJar.jsp / TestJspCompilationContext -->
<init-param>
<param-name>modificationTestInterval</param-name>
<param-value>0</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
<!-- Bug 49922 -->
<filter>
<filter-name>Bug49922</filter-name>
<filter-class>
org.apache.catalina.core.TestStandardContext$Bug49922Filter
</filter-class>
</filter>
<filter-mapping>
<filter-name>Bug49922</filter-name>
<url-pattern>/bug49922/servlet/*</url-pattern>
<url-pattern>*.do</url-pattern>
<servlet-name>Bug49922</servlet-name>
</filter-mapping>
<filter-mapping>
<filter-name>Bug49922</filter-name>
<servlet-name>Bug49922Target</servlet-name>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<servlet>
<servlet-name>Bug49922Forward</servlet-name>
<servlet-class>
org.apache.catalina.core.TestStandardContext$Bug49922ForwardServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Bug49922Forward</servlet-name>
<url-pattern>/bug49922/forward</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>Bug49922Include</servlet-name>
<servlet-class>
org.apache.catalina.core.TestStandardContext$Bug49922IncludeServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Bug49922Include</servlet-name>
<url-pattern>/bug49922/include</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>Bug49922Target</servlet-name>
<servlet-class>
org.apache.catalina.core.TestStandardContext$Bug49922TargetServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Bug49922Target</servlet-name>
<url-pattern>/bug49922/target</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>Bug49922</servlet-name>
<servlet-class>
org.apache.catalina.core.TestStandardContext$Bug49922Servlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Bug49922</servlet-name>
<url-pattern>/bug49922/servlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Bug49922</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Bug49922</servlet-name>
<url-pattern>*.od</url-pattern>
</servlet-mapping>
<jsp-config>
<jsp-property-group>
<url-pattern>/bug49nnn/bug49726a.jsp</url-pattern>
<url-pattern>/bug49nnn/bug49726b.jsp</url-pattern>
<default-content-type>text/plain</default-content-type>
</jsp-property-group>
<jsp-property-group>
<url-pattern>/bug5nnnn/bug55262.jsp</url-pattern>
<include-prelude>/bug5nnnn/bug55262-prelude.jspf</include-prelude>
<include-prelude>/bug5nnnn/bug55262-prelude.jspf</include-prelude>
<include-coda>/bug5nnnn/bug55262-coda.jspf</include-coda>
<include-coda>/bug5nnnn/bug55262-coda.jspf</include-coda>
<default-content-type>text/plain</default-content-type>
</jsp-property-group>
<jsp-property-group>
<url-pattern>/jsp/encoding/bug60769a.jspx</url-pattern>
<page-encoding>UTF-8</page-encoding>
<is-xml>true</is-xml>
</jsp-property-group>
<jsp-property-group>
<url-pattern>/jsp/encoding/bug60769b.jspx</url-pattern>
<page-encoding>ISO-8859-1</page-encoding>
<is-xml>true</is-xml>
</jsp-property-group>
</jsp-config>
<servlet>
<servlet-name>DenyByAnnotation</servlet-name>
<servlet-class>org.apache.catalina.core.TestStandardWrapper$DenyAllServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>DenyByAnnotation</servlet-name>
<url-pattern>/testStandardWrapper/securityAnnotationsMetaDataPriority</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>Bug53574</servlet-name>
<jsp-file>/WEB-INF/jsp/bug53574.jsp</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>Bug53574</servlet-name>
<url-pattern>/bug53574</url-pattern>
</servlet-mapping>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
<env-entry>
<description>Resource for testing bug 53465</description>
<env-entry-name>bug53465</env-entry-name>
<env-entry-type>java.lang.Integer</env-entry-type>
<env-entry-value>10</env-entry-value>
<mapped-name>Bug53465MappedName</mapped-name>
</env-entry>
</web-app>

View File

@@ -0,0 +1,28 @@
<%--
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.
--%>
<%@page import="javax.annotation.PostConstruct"%>
<html>
<head><title>Annotations test case</title></head>
<body>
<p>Hello world</p>
</body>
</html>
<%!
@PostConstruct
public void doNothing() {
}
%>

24
test/webapp/bug36923.jsp Normal file
View File

@@ -0,0 +1,24 @@
<%--
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.
--%>
<%@ page isELIgnored="true" %>
<html>
<head><title>Bug 36923 test case</title></head>
<body>
<p>00-${<%= "hello world" %>}</p>
</body>
</html>

18
test/webapp/bug42390.jsp Normal file
View File

@@ -0,0 +1,18 @@
<%--
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="tags" tagdir="/WEB-INF/tags" %>
<tags:bug42390><tags:bug42390/></tags:bug42390>

38
test/webapp/bug42565.jsp Normal file
View File

@@ -0,0 +1,38 @@
<%--
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="tags" tagdir="/WEB-INF/tags" %>
<html>
<head><title>Bug 42565 test case</title></head>
<body>
<tags:echo echo="00-${false?true:false}" />
<tags:echo echo="01-${false?true: false}" />
<tags:echo echo="02-${false?true :false}" />
<tags:echo echo="03-${false?true : false}" />
<tags:echo echo="04-${false? true:false}" />
<tags:echo echo="05-${false? true: false}" />
<tags:echo echo="06-${false? true :false}" />
<tags:echo echo="07-${false? true : false}" />
<tags:echo echo="08-${ false?true:false}" />
<tags:echo echo="09-${ false?true: false}" />
<tags:echo echo="10-${ false?true :false}" />
<tags:echo echo="11-${ false?true : false}" />
<tags:echo echo="12-${ false? true:false}" />
<tags:echo echo="13-${ false? true: false}" />
<tags:echo echo="14-${ false? true :false}" />
<tags:echo echo="15-${ false? true : false}" />
</body>
</html>

25
test/webapp/bug44994.jsp Normal file
View File

@@ -0,0 +1,25 @@
<%--
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="tags" tagdir="/WEB-INF/tags" %>
<html>
<head><title>Bug 44994 test case</title></head>
<body>
<tags:echo echo="00-${0 lt 0 ? 1 lt 0 ? 'many': 'one': 'none'}" />
<tags:echo echo="01-${0 lt 1 ? 1 lt 1 ? 'many': 'one': 'none'}" />
<tags:echo echo="02-${0 lt 2 ? 1 lt 2 ? 'many': 'one': 'none'}" />
</body>
</html>

View File

@@ -0,0 +1,32 @@
<%--
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="tags" tagdir="/WEB-INF/tags" %>
<html>
<head><title>Bug 45015 test case A</title></head>
<body>
<tags:echo echo="00-hello 'world'" />
<tags:echo echo="01-hello 'world" />
<tags:echo echo="02-hello world'" />
<tags:echo echo="03-hello world\'" />
<tags:echo echo="04-hello world\"" />
<tags:echo echo='05-hello "world"' />
<tags:echo echo='06-hello "world' />
<tags:echo echo='07-hello world"' />
<tags:echo echo='08-hello world\'' />
<tags:echo echo='09-hello world\"' />
</body>
</html>

View File

@@ -0,0 +1,23 @@
<%--
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="tags" tagdir="/WEB-INF/tags" %>
<html>
<head><title>Bug 45015 test case B</title></head>
<body>
<tags:echo echo="hello "wo"rld" />
</body>
</html>

View File

@@ -0,0 +1,23 @@
<%--
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="tags" tagdir="/WEB-INF/tags" %>
<html>
<head><title>Bug 45015 test case C</title></head>
<body>
<tags:echo echo="<%= "hello world" %>" />
</body>
</html>

View File

@@ -0,0 +1,39 @@
<%--
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="tags" tagdir="/WEB-INF/tags" %>
<html>
<head><title>Bug 45427 test case</title></head>
<body>
<p>00-${'hello world'}</p>
<p>01-${'hello \'world'}</p>
<p>02-${'hello "world'}</p>
<p>03-${'hello \"world'}</p>
<p>04-${"hello world"}</p>
<p>05-${"hello 'world"}</p>
<p>06-${"hello \'world"}</p>
<p>07-${"hello \"world"}</p>
<tags:echo echo="08-${'hello world'}" />
<tags:echo echo="09-${'hello \\'world'}" />
<tags:echo echo="10-${'hello \"world'}" />
<tags:echo echo="11-${'hello \\\"world'}" />
<tags:echo echo='12-${"hello world"}' />
<tags:echo echo='13-${"hello \'world"}' />
<tags:echo echo='14-${"hello \\\'world"}' />
<tags:echo echo='15-${"hello \\"world"}' />
</body>
</html>

View File

@@ -0,0 +1,38 @@
<%--
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.
--%>
<p>00-${1+1}</p>
<p>01-\${1+1}</p>
<p>02-\\${1+1}</p>
<p>03-\\\${1+1}</p>
<p>04-\$500</p>
<p>05-${'\\$'}</p>
<p>06-${'\\${'}</p>
<tags:echo echo="10-${1+1}" />
<tags:echo echo="11-\${1+1}" />
<tags:echo echo="12-\\${1+1}" />
<tags:echo echo="13-\\\${1+1}" />
<tags:echo echo="14-\\\\${1+1}" />
<tags:echo echo="15-\$500" />
<tags:echo echo="16-${'\\\\$'}" />
<tags:echo echo="17-${'\\\\${'}" />
<tags:echo-deferred echo="20-#{1+1}" />
<tags:echo-deferred echo="21-\#{1+1}" />
<tags:echo-deferred echo="22-\\#{1+1}" />
<tags:echo-deferred echo="23-\\\#{1+1}" />
<tags:echo-deferred echo="24-\\\\#{1+1}" />
<tags:echo-deferred echo="25-#{'\\\\#'}" />
<tags:echo-deferred echo="26-#{'\\\\#{'}" />

View File

@@ -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.
--%>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<html>
<head><title>Bug 45451 test case</title></head>
<body>
<tags:echo echo="00-\\\'${'hello world'}\\\'" />
<tags:echo echo="01-\\\'${\"hello world\"}\\\'" />
<tags:echo echo='02-\\\'${\'hello world\'}\\\'' />
<tags:echo echo='03-\\\'${"hello world"}\\\'' />
</body>
</html>

View File

@@ -0,0 +1,19 @@
<%--
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.
--%>
<%@page isELIgnored="false" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<%@ include file="bug45451.jspf" %>

View File

@@ -0,0 +1,19 @@
<%--
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.
--%>
<%@page isELIgnored="true" deferredSyntaxAllowedAsLiteral="true" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<%@ include file="bug45451.jspf" %>

View File

@@ -0,0 +1,42 @@
<!--
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.
-->
<jsp:root
xmlns:bug45451="urn:jsptagdir:/WEB-INF/tags/bug45451"
xmlns:jsp="http://java.sun.com/JSP/Page" version="2.2"
xmlns:tags="urn:jsptagdir:/WEB-INF/tags" >
<jsp:directive.page isELIgnored="false" />
<html>
<body>
<p>00-${1+1}</p>
<p>01-\${1+1}</p>
<p>02-\\${1+1}</p>
<p>03-\\\${1+1}</p>
<p>04-\$500</p>
<tags:echo echo="10-${1+1}" />
<tags:echo echo="11-\${1+1}" />
<tags:echo echo="12-\\${1+1}" />
<tags:echo echo="13-\\\${1+1}" />
<tags:echo echo="14-\\\\${1+1}" />
<tags:echo echo="15-\$500" />
<tags:echo-deferred echo="20-#{1+1}" />
<tags:echo-deferred echo="21-\#{1+1}" />
<tags:echo-deferred echo="22-\\#{1+1}" />
<tags:echo-deferred echo="23-\\\#{1+1}" />
<tags:echo-deferred echo="24-\\\\#{1+1}" />
</body>
</html>
</jsp:root>

View File

@@ -0,0 +1,19 @@
<%--
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.
--%>
<%@page deferredSyntaxAllowedAsLiteral="true" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<%@ include file="bug45451.jspf" %>

View File

@@ -0,0 +1,24 @@
<%--
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="tags" tagdir="/WEB-INF/tags" %>
<html>
<head><title>Bug 45511 test case</title></head>
<body>
<tags:echo echo="00-${empty(null)}" />
<tags:echo echo="01-${not(true)}" />
</body>
</html>

28
test/webapp/bug46381.jsp Normal file
View File

@@ -0,0 +1,28 @@
<%--
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="tags" tagdir="/WEB-INF/tags" %>
<html>
<head><title>Bug 46381 test case</title></head>
<%
pageContext.setAttribute("foo","hello");
pageContext.setAttribute("bar","world");
%>
<body>
<tags:echo echo="00-${foo}${bar}" />
<tags:echo echo="00-${foo}${bar}${undefined}" />
</body>
</html>

25
test/webapp/bug46596.jsp Normal file
View File

@@ -0,0 +1,25 @@
<%--
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 uri="http://tomcat.apache.org/testerFunctions" prefix="fn" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<html>
<head><title>Bug 46596 test case</title></head>
<body>
<tags:echo echo="${fn:trim
('{OK}')}"/>
</body>
</html>

23
test/webapp/bug47331.jsp Normal file
View File

@@ -0,0 +1,23 @@
<%--
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="tags" tagdir="/WEB-INF/tags" %>
<html>
<head><title>Bug 47331 test case</title></head>
<body>
<p>This is a #{'test'}</p>
</body>
</html>

51
test/webapp/bug47413.jsp Normal file
View File

@@ -0,0 +1,51 @@
<%--
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="tags" tagdir="/WEB-INF/tags" %>
<jsp:useBean id="values" class="jsp2.examples.ValuesBean" />
<html>
<head><title>Bug 47413 test case</title></head>
<body>
<jsp:setProperty name="values" property="stringValue" value="${'hello'} wo${'rld'}"/>
<p>00-${values.stringValue}</p>
<tags:echo echo="01-${'hello'} wo${'rld'}"/>
<jsp:setProperty name="values" property="doubleValue" value="${1+2}.${220}"/>
<p>02-${values.doubleValue}</p>
<tags:echo-double index="03" echo="${1+2}.${220}"/>
<jsp:setProperty name="values" property="longValue" value="000${1}${7}"/>
<p>04-${values.longValue}</p>
<tags:echo-long index="05" echo="000${1}${7}"/>
<jsp:setProperty name="values" property="stringValue"
value="${undefinedFoo}hello world${undefinedBar}"/>
<p>06-${values.stringValue}</p>
<tags:echo echo="${undefinedFoo}07-hello world${undefinedBar}"/>
<jsp:setProperty name="values" property="doubleValue"
value="${undefinedFoo}${undefinedBar}"/>
<p>08-${values.doubleValue}</p>
<tags:echo-double index="09" echo="${undefinedFoo}${undefinedBar}"/>
<jsp:setProperty name="values" property="longValue"
value="${undefinedFoo}${undefinedBar}"/>
<p>10-${values.longValue}</p>
<tags:echo-long index="11" echo="${undefinedFoo}${undefinedBar}"/>
</body>
</html>

26
test/webapp/bug47977.jspx Normal file
View File

@@ -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.
-->
<jsp:root
xmlns:jsp="http://java.sun.com/JSP/Page" version="2.2"
xmlns:tags="urn:jsptagdir:/WEB-INF/tags" >
<jsp:directive.page isELIgnored="false" />
<html>
<body>
<tags:echo echo="00-Hello World">xxx</tags:echo>
</body>
</html>
</jsp:root>

View File

@@ -0,0 +1,24 @@
<%--
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 uri="http://tomcat.apache.org/testerFunctions" prefix="fn" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<html>
<head><title>Bug 48112 test case</title></head>
<body>
<tags:echo echo="${fn:trim('{OK}')}"/>
</body>
</html>

View File

@@ -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>

View File

@@ -0,0 +1,31 @@
<%--
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" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<%--
Tries to place the classic tag that defines a variable
into a simple tag
--%>
<bugs:Bug48616b />
<tags:bug42390>
<bugs:Bug46816a>
<bugs:Bug48616b />
</bugs:Bug46816a>
</tags:bug42390>
<%
out.println(X);
%>

View File

@@ -0,0 +1,24 @@
<%--
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="tags" tagdir="/WEB-INF/tags" %>
<html>
<head><title>Bug 46596 test case</title></head>
<body>
<tags:echo-noel echo="00-\\"/>
<tags:echo echo="01-\\"/>
</body>
</html>

View File

@@ -0,0 +1,60 @@
<%--
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.
--%>
<%@ page isELIgnored="true" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<html>
<head><title>Bug 48668a test case</title></head>
<body>
<p><tags:echo echo="00-Hello world" />#{foo.bar}</p>
<p><tags:echo echo="01-Hello world" />${foo.bar}</p>
<p>10-<tags:bug48668 expr="Hello ${'foo.bar}" /></p>
<p>11-Hello <tags:bug48668 expr="${'foo.bar}" /></p>
<p>12-<tags:bug48668 expr="Hello #{'foo.bar}" /></p>
<p>13-Hello <tags:bug48668 expr="#{'foo.bar}" /></p>
<p>14-<tags:bug48668 expr="Hello ${'foo" />}</p>
<p>15-Hello <tags:bug48668 expr="${'foo" />}</p>
<p>16-<tags:bug48668 expr="Hello #{'foo" />}</p>
<p>17-Hello <tags:bug48668 expr="#{'foo" />}</p>
<p>18-<tags:bug48668 ><jsp:attribute name="expr">Hello ${'foo.bar}</jsp:attribute></tags:bug48668></p>
<p>19-Hello <tags:bug48668 ><jsp:attribute name="expr">${'foo.bar}</jsp:attribute></tags:bug48668></p>
<p>20-<tags:bug48668 ><jsp:attribute name="expr">Hello #{'foo.bar}</jsp:attribute></tags:bug48668></p>
<p>21-Hello <tags:bug48668 ><jsp:attribute name="expr">#{'foo.bar}</jsp:attribute></tags:bug48668></p>
<p>30-<tags:bug48668 noexpr="Hello ${'foo}"/></p>
<p>31-Hello <tags:bug48668 noexpr="${'foo}"/></p>
<p>32-<tags:bug48668 noexpr="Hello #{'foo}"/></p>
<p>33-Hello <tags:bug48668 noexpr="#{'foo}"/></p>
<p>34-<tags:bug48668><jsp:attribute name="noexpr">Hello ${'foo}</jsp:attribute></tags:bug48668></p>
<p>35-Hello <tags:bug48668><jsp:attribute name="noexpr">${'foo}</jsp:attribute></tags:bug48668></p>
<p>36-<tags:bug48668><jsp:attribute name="noexpr">Hello #{'foo}</jsp:attribute></tags:bug48668></p>
<p>37-Hello <tags:bug48668><jsp:attribute name="noexpr">#{'foo}</jsp:attribute></tags:bug48668></p>
<p>40-<tags:bug48668><jsp:attribute name="fragment">Hello ${'foo}</jsp:attribute></tags:bug48668></p>
<p>41-Hello <tags:bug48668><jsp:attribute name="fragment">${'foo}</jsp:attribute></tags:bug48668></p>
<p>42-<tags:bug48668><jsp:attribute name="fragment">Hello #{'foo}</jsp:attribute></tags:bug48668></p>
<p>43-Hello <tags:bug48668><jsp:attribute name="fragment">#{'foo}</jsp:attribute></tags:bug48668></p>
<p>50-<tags:bug48668>Hello ${'foo}</tags:bug48668></p>
<p>51-Hello <tags:bug48668>${'foo}</tags:bug48668></p>
<p>52-<tags:bug48668>Hello #{'foo}</tags:bug48668></p>
<p>53-Hello <tags:bug48668>#{'foo}</tags:bug48668></p>
</body>
</html>

View File

@@ -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.
--%>
<%@ page deferredSyntaxAllowedAsLiteral="true" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<html>
<head><title>Bug 48668b test case</title></head>
<body>
<p><tags:echo echo="00-Hello world" />#{foo.bar}</p>
<p><tags:echo echo="01-Hello world" />#{foo${1 + 1}</p>
</body>
</html>

View File

@@ -0,0 +1,20 @@
<%--
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 uri="http://tomcat.apache.org/bugs" prefix="bugs" %>
<bugs:Bug48701c beanName="now" />
<jsp:getProperty name="now" property="time" />
<p>00-PASS</p>

View File

@@ -0,0 +1,20 @@
<%--
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 uri="http://tomcat.apache.org/bugs" prefix="bugs" %>
<bugs:Bug48701b/>
<jsp:getProperty name="now" property="time" />
<p>00-PASS</p>

View File

@@ -0,0 +1,19 @@
<%--
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.
--%>
<jsp:useBean id="now" class="java.util.Date" />
<jsp:getProperty name="now" property="time" />
<p>00-PASS</p>

View File

@@ -0,0 +1,20 @@
<%--
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 uri="http://tomcat.apache.org/bugs" prefix="bugs" %>
<bugs:Bug48701a/>
<jsp:getProperty name="now" property="time" />
<p>00-PASS</p>

View File

@@ -0,0 +1,19 @@
<%--
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 uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="now" value='<%= new java.util.Date() %>' />
<jsp:getProperty name="now" property="time" />

View File

@@ -0,0 +1,30 @@
<!--
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.
-->
<jsp:root
xmlns:jsp="http://java.sun.com/JSP/Page" version="2.2"
xmlns:tags="urn:jsptagdir:/WEB-INF/tags" >
<jsp:directive.page isELIgnored="false" />
<html>
<body>
<tags:echo>
<jsp:attribute name="echo">00-Hello World</jsp:attribute>
</tags:echo>
<tags:echo echo="01-Hello World"></tags:echo>
<tags:echo echo="02-Hello World"> </tags:echo>
</body>
</html>
</jsp:root>

View File

@@ -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, it shouldn't throw an NPE
pageContext.getErrorData();
%>
<html>
<head><title>Bug 49196 test case</title></head>
<body>
<p>OK</p>
</body>
</html>

View File

@@ -0,0 +1,23 @@
<%--
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="tags" tagdir="/WEB-INF/tags" %>
<html>
<head><title>Bug 49297 duplicate attribute test case</title></head>
<body>
<tags:echo echo="Hello World" echo="error"/>
</body>
</html>

View File

@@ -0,0 +1,28 @@
<%--
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.
--%>
<%@page import="java.util.List" import="java.util.ArrayList" %>
<html>
<head><title>Bug 49297 multiple import test case</title></head>
<body>
<%
// Make sure the imports above do work
List<String> l = new ArrayList<String>();
l.add("OK");
%>
<p><%=l.get(0)%></p>
</body>
</html>

View File

@@ -0,0 +1,29 @@
<%--
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.
--%>
<%@page import="java.util.List" %>
<%@page import="java.util.ArrayList" %>
<html>
<head><title>Bug 49297 multiple import test case</title></head>
<body>
<%
// Make sure the imports above do work
List<String> l = new ArrayList<String>();
l.add("OK");
%>
<p><%=l.get(0)%></p>
</body>
</html>

View File

@@ -0,0 +1,24 @@
<%--
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.
--%>
<%@page pageEncoding="ISO-8859-1" %>
<%@page pageEncoding="ISO-8859-1" %>
<html>
<head><title>Bug 49297 multiple pageEncoding test case</title></head>
<body>
<p>Should fail</p>
</body>
</html>

View File

@@ -0,0 +1,23 @@
<%--
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.
--%>
<%@page pageEncoding="ISO-8859-1" pageEncoding="ISO-8859-1" %>
<html>
<head><title>Bug 49297 multiple pageEncoding test case</title></head>
<body>
<p>Should fail</p>
</body>
</html>

View File

@@ -0,0 +1,24 @@
<%--
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.
--%>
<%@page pageEncoding="ISO-8859-1" %>
<%@page pageEncoding="UTF-8" %>
<html>
<head><title>Bug 49297 multiple pageEncoding test case</title></head>
<body>
<p>Should fail</p>
</body>
</html>

View File

@@ -0,0 +1,23 @@
<%--
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.
--%>
<%@page pageEncoding="ISO-8859-1" pageEncoding="UTF-8"%>
<html>
<head><title>Bug 49297 multiple pageEncoding test case</title></head>
<body>
<p>Should fail</p>
</body>
</html>

View File

@@ -0,0 +1,23 @@
<%--
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="tags" tagdir="/WEB-INF/tags" %>
<html>
<head><title>Bug 49297 whitespace test case</title></head>
<body>
<tags:echo echo="Hello World"dummy="ignored"/>
</body>
</html>

View File

@@ -0,0 +1,23 @@
<%--
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="tags" tagdir="/WEB-INF/tags" %>
<html>
<head><title>Bug 49297 duplicate attribute test case</title></head>
<body>
<tags:bug49297 />
</body>
</html>

View File

@@ -0,0 +1 @@
<EFBFBD>

View File

@@ -0,0 +1 @@
<EFBFBD>

View File

@@ -0,0 +1 @@
<EFBFBD>

View File

@@ -0,0 +1 @@
½

View File

@@ -0,0 +1 @@
½

View File

@@ -0,0 +1,18 @@
<%--
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 uri="http://tomcat.apache.org/bugs" prefix="bugs" %>
<p>00-${bugs:bug49555()}</p>

View File

@@ -0,0 +1,24 @@
<%--
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.
--%>
<%@ page contentType="text/html"%>
<html>
<head><title>Bug 49726 test case</title></head>
<body>
<p>OK</p>
</body>
</html>

View File

@@ -0,0 +1,23 @@
<%--
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>
<head><title>Bug 49726 test case</title></head>
<body>
<p>OK</p>
</body>
</html>

View File

@@ -0,0 +1,40 @@
<%--
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.
--%>
<jsp:element name="p">
<jsp:attribute name="style" omit="false">color:red</jsp:attribute>
<jsp:body>00-Red</jsp:body>
</jsp:element>
<jsp:element name="p">
<jsp:attribute name="style" omit="true">color:red</jsp:attribute>
<jsp:body>01-Not Red</jsp:body>
</jsp:element>
<jsp:element name="p">
<jsp:attribute name="style" omit="${false}">color:red</jsp:attribute>
<jsp:body>02-Red</jsp:body>
</jsp:element>
<jsp:element name="p">
<jsp:attribute name="style" omit="${true}">color:red</jsp:attribute>
<jsp:body>03-Not Red</jsp:body>
</jsp:element>
<jsp:element name="p">
<jsp:attribute name="style" omit="<%=(1==2)%>">color:red</jsp:attribute>
<jsp:body>04-Red</jsp:body>
</jsp:element>
<jsp:element name="p">
<jsp:attribute name="style" omit="<%=(1==1)%>">color:red</jsp:attribute>
<jsp:body>05-Not Red</jsp:body>
</jsp:element>

View File

@@ -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>OK</p>
</body>
</html>

View File

@@ -0,0 +1 @@
OK

View File

@@ -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>OK</p>
</body>
</html>

View File

@@ -0,0 +1 @@
OK

View File

@@ -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>OK</p>
</body>
</html>

View File

@@ -0,0 +1 @@
OK

View File

@@ -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>OK</p>
</body>
</html>

View File

@@ -0,0 +1 @@
OK

View File

@@ -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>OK</p>
</body>
</html>

View File

@@ -0,0 +1 @@
OK

View File

@@ -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>OK</p>
</body>
</html>

View File

@@ -0,0 +1 @@
OK

View File

@@ -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>OK</p>
</body>
</html>

View File

@@ -0,0 +1 @@
OK

View File

@@ -0,0 +1,36 @@
<%--
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.
--%>
<%@page contentType="text/plain; charset=UTF-8"
%><%@page import="java.net.URL,java.net.URLConnection"%><%
String[] testFiles = new String[] {"foo;bar.txt", "foo&bar.txt",
"foo#bar.txt", "foo%bar.txt", "foo+bar.txt", "foo bar.txt",
"foo bar/foobar.txt"};
for (String testFile : testFiles) {
URL url = application.getResource("/bug53257/" + testFile);
if (url == null) {
out.print("FAIL (url) - " + testFile + "\n");
} else {
URLConnection conn = url.openConnection();
long lastModified = conn.getLastModified();
if (lastModified == -1) {
out.print("FAIL (last modified)- " + testFile + "\n");
} else {
out.print("PASS - " + testFile + "\n");
}
}
}
%>

View File

@@ -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.
--%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<body>
<c:forEach items="${pageContext.response.headerNames}" var="name">
<c:forEach items="${pageContext.response.getHeaders(name)}" var="value">
<p>${name} : ${value}</p>
</c:forEach>
</c:forEach>
</body>
</html>

View File

@@ -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.
--%>
<%@ page import="java.util.Collections" %>
<html>
<head><title>Bug 51544 test case</title></head>
<%
pageContext.setAttribute("list",Collections.emptyList());
%>
<body>
<p>Empty list: ${list.isEmpty()}</p>
</body>
</html>

View File

@@ -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.
--%>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<html>
<head><title>Bug 52335 test case</title></head>
<body>
<p>00 - \% \\% <\%</p>
<p>01 - <b><\%</b></p>
<p>02 - <tags:echo echo="Foo" /><\%</p>
</body>
</html>

View File

@@ -0,0 +1,29 @@
<%--
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.
--%>
<%@ page import="javax.naming.Context" %>
<%@ page import="javax.naming.InitialContext" %>
<head>
<body>
<%
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
Integer test = (Integer) envCtx.lookup("bug53465");
out.print("<p>" + test.intValue() + "</p>");
%>
</body>
</head>

View File

@@ -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.
--%>
<head>
<body>
<p>OK</p>
</body>
</head>

View File

@@ -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>OK</p>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More