init
This commit is contained in:
19
test/webapp-fragments/'singlequote2.jsp
Normal file
19
test/webapp-fragments/'singlequote2.jsp
Normal 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.
|
||||
--%><%--
|
||||
Resource file that is present both in the web application and in the
|
||||
WEB-INF/lib/resources.jar file. The one in the web application should win.
|
||||
--%><p>'singlequote2.jsp in file system</p>
|
||||
0
test/webapp-fragments/WEB-INF/classes/#Bug51584.txt
Normal file
0
test/webapp-fragments/WEB-INF/classes/#Bug51584.txt
Normal 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.
|
||||
--%>
|
||||
<%--
|
||||
Resource file that is present both in the web application and in the
|
||||
WEB-INF/lib/resources.jar file. The one in the web application should win.
|
||||
--%>
|
||||
<p>resourceG.jsp in WEB-INF/classes</p>
|
||||
BIN
test/webapp-fragments/WEB-INF/lib/resources.jar
Normal file
BIN
test/webapp-fragments/WEB-INF/lib/resources.jar
Normal file
Binary file not shown.
BIN
test/webapp-fragments/WEB-INF/lib/resources2.jar
Normal file
BIN
test/webapp-fragments/WEB-INF/lib/resources2.jar
Normal file
Binary file not shown.
179
test/webapp-fragments/WEB-INF/web.xml
Normal file
179
test/webapp-fragments/WEB-INF/web.xml
Normal file
@@ -0,0 +1,179 @@
|
||||
<?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://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-app_3_0.xsd"
|
||||
version="3.0"
|
||||
metadata-complete="false">
|
||||
|
||||
<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>AllowByAnnotation</servlet-name>
|
||||
<servlet-class>org.apache.catalina.core.TestStandardWrapper$SubclassAllowAllServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>AllowByAnnotation</servlet-name>
|
||||
<url-pattern>/testStandardWrapper/securityAnnotationsWebXmlPriority</url-pattern>
|
||||
</servlet-mapping>
|
||||
<security-constraint>
|
||||
<auth-constraint/>
|
||||
<web-resource-collection>
|
||||
<url-pattern>/testStandardWrapper/securityAnnotationsWebXmlPriority</url-pattern>
|
||||
</web-resource-collection>
|
||||
</security-constraint>
|
||||
|
||||
<!-- Bug 51396 -->
|
||||
<servlet>
|
||||
<servlet-name>bug51396</servlet-name>
|
||||
<jsp-file>/bug51396.jsp</jsp-file>
|
||||
</servlet>
|
||||
|
||||
<post-construct>
|
||||
<lifecycle-callback-class>org.apache.catalina.startup.TesterServletWithLifeCycleMethods</lifecycle-callback-class>
|
||||
<lifecycle-callback-method>postConstruct1</lifecycle-callback-method>
|
||||
</post-construct>
|
||||
<pre-destroy>
|
||||
<lifecycle-callback-class>org.apache.catalina.startup.TesterServletWithLifeCycleMethods</lifecycle-callback-class>
|
||||
<lifecycle-callback-method>preDestroy1</lifecycle-callback-method>
|
||||
</pre-destroy>
|
||||
|
||||
<env-entry>
|
||||
<env-entry-name>envEntry2</env-entry-name>
|
||||
<env-entry-type>java.lang.Integer</env-entry-type>
|
||||
<env-entry-value>2</env-entry-value>
|
||||
<injection-target>
|
||||
<injection-target-class>org.apache.catalina.startup.TesterServletWithAnnotations</injection-target-class>
|
||||
<injection-target-name>envEntry2</injection-target-name>
|
||||
</injection-target>
|
||||
</env-entry>
|
||||
<env-entry>
|
||||
<env-entry-name>envEntry3</env-entry-name>
|
||||
<env-entry-type>java.lang.Integer</env-entry-type>
|
||||
<env-entry-value>33</env-entry-value>
|
||||
<injection-target>
|
||||
<injection-target-class>org.apache.catalina.startup.TesterServletWithAnnotations</injection-target-class>
|
||||
<injection-target-name>envEntry3</injection-target-name>
|
||||
</injection-target>
|
||||
</env-entry>
|
||||
<env-entry>
|
||||
<env-entry-name>envEntry5</env-entry-name>
|
||||
<env-entry-type>java.lang.Integer</env-entry-type>
|
||||
<env-entry-value>55</env-entry-value>
|
||||
</env-entry>
|
||||
<env-entry>
|
||||
<env-entry-name>envEntry6</env-entry-name>
|
||||
<env-entry-type>java.lang.Integer</env-entry-type>
|
||||
<env-entry-value>66</env-entry-value>
|
||||
</env-entry>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>injection</servlet-name>
|
||||
<servlet-class>org.apache.naming.TesterInjectionServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>injection</servlet-name>
|
||||
<url-pattern>/injection</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<env-entry>
|
||||
<env-entry-name>env-entry/basic</env-entry-name>
|
||||
<env-entry-type>java.lang.String</env-entry-type>
|
||||
<env-entry-value>basic-value</env-entry-value>
|
||||
</env-entry>
|
||||
|
||||
<env-entry>
|
||||
<env-entry-name>env-entry/valid</env-entry-name>
|
||||
<env-entry-type>org.apache.naming.TesterEnvEntry</env-entry-type>
|
||||
<env-entry-value>valid</env-entry-value>
|
||||
</env-entry>
|
||||
|
||||
<env-entry>
|
||||
<env-entry-name>env-entry/invalid</env-entry-name>
|
||||
<env-entry-type>org.apache.naming.TesterEnvEntry</env-entry-type>
|
||||
<env-entry-value>invalid</env-entry-value>
|
||||
</env-entry>
|
||||
|
||||
<env-entry>
|
||||
<env-entry-name>env-entry/injectField</env-entry-name>
|
||||
<env-entry-type>java.lang.String</env-entry-type>
|
||||
<env-entry-value>inject-value-1</env-entry-value>
|
||||
<injection-target>
|
||||
<injection-target-class>org.apache.naming.TesterInjectionServlet</injection-target-class>
|
||||
<injection-target-name>property1</injection-target-name>
|
||||
</injection-target>
|
||||
</env-entry>
|
||||
|
||||
<env-entry>
|
||||
<env-entry-name>env-entry/injectProperty</env-entry-name>
|
||||
<env-entry-type>java.lang.String</env-entry-type>
|
||||
<env-entry-value>inject-value-2</env-entry-value>
|
||||
<injection-target>
|
||||
<injection-target-class>org.apache.naming.TesterInjectionServlet</injection-target-class>
|
||||
<injection-target-name>property2</injection-target-name>
|
||||
</injection-target>
|
||||
</env-entry>
|
||||
|
||||
<env-entry>
|
||||
<env-entry-name>env-entry/injectFieldNoType</env-entry-name>
|
||||
<env-entry-value>inject-value-3</env-entry-value>
|
||||
<injection-target>
|
||||
<injection-target-class>org.apache.naming.TesterInjectionServlet</injection-target-class>
|
||||
<injection-target-name>property3</injection-target-name>
|
||||
</injection-target>
|
||||
</env-entry>
|
||||
|
||||
<env-entry>
|
||||
<env-entry-name>env-entry/injectNoValue</env-entry-name>
|
||||
<env-entry-type>java.lang.String</env-entry-type>
|
||||
<injection-target>
|
||||
<injection-target-class>org.apache.naming.TesterInjectionServlet</injection-target-class>
|
||||
<injection-target-name>property4</injection-target-name>
|
||||
</injection-target>
|
||||
</env-entry>
|
||||
|
||||
<env-entry>
|
||||
<env-entry-name>env-entry/lookup</env-entry-name>
|
||||
<env-entry-type>java.lang.String</env-entry-type>
|
||||
<lookup-name>java:comp/env/env-entry/basic</lookup-name>
|
||||
</env-entry>
|
||||
|
||||
<env-entry>
|
||||
<env-entry-name>env-entry/circular1</env-entry-name>
|
||||
<env-entry-type>java.lang.String</env-entry-type>
|
||||
<lookup-name>java:comp/env/env-entry/circular2</lookup-name>
|
||||
</env-entry>
|
||||
|
||||
<env-entry>
|
||||
<env-entry-name>env-entry/circular2</env-entry-name>
|
||||
<env-entry-type>java.lang.String</env-entry-type>
|
||||
<lookup-name>java:comp/env/env-entry/circular1</lookup-name>
|
||||
</env-entry>
|
||||
|
||||
<env-entry>
|
||||
<env-entry-name>env-entry/lookup-invalid</env-entry-name>
|
||||
<env-entry-type>java.lang.Integer</env-entry-type>
|
||||
<lookup-name>java:comp/env/env-entry/basic</lookup-name>
|
||||
</env-entry>
|
||||
|
||||
</web-app>
|
||||
21
test/webapp-fragments/bug51396.jsp
Normal file
21
test/webapp-fragments/bug51396.jsp
Normal 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>
|
||||
21
test/webapp-fragments/folder/resourceC.jsp
Normal file
21
test/webapp-fragments/folder/resourceC.jsp
Normal 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.
|
||||
--%>
|
||||
<%--
|
||||
Resource file that is present both in the web application and in the
|
||||
WEB-INF/lib/resources.jar file. The one in the web application should win.
|
||||
--%>
|
||||
<p>resourceC.jsp in the web application</p>
|
||||
20
test/webapp-fragments/folder/resourceE.jsp
Normal file
20
test/webapp-fragments/folder/resourceE.jsp
Normal 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.
|
||||
--%>
|
||||
<%--
|
||||
Resource file that is present in the web application only.
|
||||
--%>
|
||||
<p>resourceE.jsp in the web application</p>
|
||||
31
test/webapp-fragments/jndi.jsp
Normal file
31
test/webapp-fragments/jndi.jsp
Normal 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.
|
||||
--%>
|
||||
<%@page contentType="text/plain" pageEncoding="UTF-8"%><%
|
||||
String jndiName = request.getParameter("jndiName");
|
||||
|
||||
javax.naming.Context initCtx = new javax.naming.InitialContext();
|
||||
javax.naming.Context envCtx = (javax.naming.Context) initCtx.lookup("java:comp/env");
|
||||
|
||||
try {
|
||||
Object obj = envCtx.lookup(jndiName);
|
||||
out.println(obj.toString());
|
||||
} catch (javax.naming.NameNotFoundException e) {
|
||||
out.println("Not Found");
|
||||
} catch (javax.naming.NamingException e) {
|
||||
out.println("Naming Error");
|
||||
}
|
||||
%>
|
||||
21
test/webapp-fragments/resourceA.jsp
Normal file
21
test/webapp-fragments/resourceA.jsp
Normal 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.
|
||||
--%>
|
||||
<%--
|
||||
Resource file that is present both in the web application and in the
|
||||
WEB-INF/lib/resources.jar file. The one in the web application should win.
|
||||
--%>
|
||||
<p>resourceA.jsp in the web application</p>
|
||||
21
test/webapp-fragments/warDirContext.jsp
Normal file
21
test/webapp-fragments/warDirContext.jsp
Normal 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.
|
||||
--%><%
|
||||
try {
|
||||
Class<?> clazz = Class.forName("'P'");
|
||||
} catch (Exception e) {
|
||||
out.print("<p>" + e.getClass().getName() + "</p>");
|
||||
}%>
|
||||
Reference in New Issue
Block a user