ASF Bugzilla – Attachment 27183 Details for
Bug 51396
Embedding class cannot launch a webapp with a jsp servlet
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch including fix to the problem.
bz51396.patch (text/plain), 3.17 KB, created by
bmargulies
on 2011-06-20 22:40:22 UTC
(
hide
)
Description:
Patch including fix to the problem.
Filename:
MIME Type:
Creator:
bmargulies
Created:
2011-06-20 22:40:22 UTC
Size:
3.17 KB
patch
obsolete
>Index: test/org/apache/catalina/startup/TestJspServlet.java >=================================================================== >--- 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(); >+ } >+} > >Property changes on: test/org/apache/catalina/startup/TestJspServlet.java >___________________________________________________________________ >Added: svn:mime-type > + text/plain >Added: svn:eol-style > + native > >Index: test/webapp-2.3-jsp-servlet/WEB-INF/web.xml >=================================================================== >--- 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. > </description> >-</web-app> >\ No newline at end of file >+ <servlet> >+ <servlet-name>ping</servlet-name> >+ <!-- doesn't have to be here to demonstrate bz 51396 --> >+ <jsp-file>/ping.jsp</jsp-file> >+ </servlet> >+</web-app> >Index: java/org/apache/catalina/startup/ContextConfig.java >=================================================================== >--- 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<String, String> initParam: jspServletDef.getParameterMap().entrySet()) { >- servletDef.addInitParameter(initParam.getKey(), initParam.getValue()); >+ if (jspServletDef != null) { >+ for (Map.Entry<String, String> initParam: jspServletDef.getParameterMap().entrySet()) { >+ servletDef.addInitParameter(initParam.getKey(), initParam.getValue()); >+ } > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 51396
:
27182
|
27183