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

http://issues.apache.org/bugzilla/show_bug.cgi?id=43668

           Summary: ApplicationDispatcher.doForward for non-HTTP request is
                    always NULL
           Product: Tomcat 6
           Version: 6.0.14
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: critical
          Priority: P2
         Component: Catalina
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


This applies to both 6.x and 5.5x version !!

Tomcat6.x
http://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationDispatcher.java

Tomcat5.5.x
http://svn.apache.org/repos/asf/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java

There is a severe always-NULL case in both T6.x and T5.5x sources if request is
non-HTTP forward. processRequest(req, res, state) method should use the original
"request" and "response" objects, but it gives "hrequest" and "hresponse" 
objects.

private void doForward(ServletRequest request, ServletResponse response) {
   ...continue...
  // Identify the HTTP-specific request and response objects (if any)
  HttpServletRequest hrequest = null;
  if (request instanceof HttpServletRequest)
     hrequest = (HttpServletRequest) request;
  HttpServletResponse hresponse = null;
  if (response instanceof HttpServletResponse)
     hresponse = (HttpServletResponse) response;

   // Handle a non-HTTP forward by passing the existing request/response
   if ((hrequest == null) || (hresponse == null)) {
      processRequest(hrequest,hresponse,state);
   }
   ...continue...
}

Calling program gets a NPE exception when forwarding a request.
java.lang.NullPointerException at 
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:459)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to