--- test/org/apache/catalina/startup/TestJspServlet.java (revision 0)
+++ test/org/apache/catalina/startup/TestJspServlet.java (revision 0)
@@ -0,0 +1,34 @@
+/*
+ * 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.catalina.startup;
+
+import java.io.File;
+
+public class TestJspServlet extends TomcatBaseTest {
+
+ public void testJspServlet() throws Exception {
+ Tomcat tomcat = getTomcatInstance();
+
+ File appDir =
+ new File("test/webapp-2.3-jsp-servlet");
+ // app dir is relative to server home
+ tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
+
+ tomcat.start();
+ }
+}
+ text/plain
+ native
--- test/webapp-2.3-jsp-servlet/WEB-INF/web.xml (revision 1137791)
+++ test/webapp-2.3-jsp-servlet/WEB-INF/web.xml (working copy)
@@ -29,4 +29,9 @@
specification do not change the behaviour of applications that declared an
earlier version of the specification.
-
+
+ ping
+
+ /ping.jsp
+
+
--- java/org/apache/catalina/startup/ContextConfig.java (revision 1137791)
+++ java/org/apache/catalina/startup/ContextConfig.java (working copy)
@@ -1405,8 +1405,10 @@
}
servletDef.getParameterMap().put("jspFile", jspFile);
servletDef.setJspFile(null);
- for (Map.Entry initParam: jspServletDef.getParameterMap().entrySet()) {
- servletDef.addInitParameter(initParam.getKey(), initParam.getValue());
+ if (jspServletDef != null) {
+ for (Map.Entry initParam: jspServletDef.getParameterMap().entrySet()) {
+ servletDef.addInitParameter(initParam.getKey(), initParam.getValue());
+ }
}
}