You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/12/04 14:29:21 UTC

DO NOT REPLY [Bug 25199] New: - Mapper throws NullPointerException, if no DefaultServlet is defined

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25199>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25199

Mapper throws NullPointerException, if no DefaultServlet is defined

           Summary: Mapper throws NullPointerException, if no DefaultServlet
                    is defined
           Product: Tomcat 5
           Version: Nightly Build
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Major
          Priority: Other
         Component: Connector:HTTP/1.1
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: tfohrer@t-online.de


TestCase:
 1. remove DefaultServlet from conf/web.xml 
 2. create/deploy a context with welcome-resources
 3. try to access this context


Index: Mapper.java
===================================================================
RCS file:
/home/cvspublic/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/mapper/Mapper.java,v
retrieving revision 1.30
diff -u -w -b -r1.30 Mapper.java
--- Mapper.java 21 Aug 2003 01:20:39 -0000      1.30
+++ Mapper.java 4 Dec 2003 13:22:03 -0000
@@ -708,7 +708,7 @@
                         if (file != null && !(file instanceof DirContext) ) {
                             internalMapExtensionWrapper(extensionWrappers,
                                                         path, mappingData);
-                            if (mappingData.wrapper == null) {
+                            if (mappingData.wrapper == null &&
context.defaultWrapper != null) {
                                 mappingData.wrapper =
                                     context.defaultWrapper.object;
                                 mappingData.requestPath.setChars

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org