rleland     2002/06/26 11:49:17

  Modified:    src/share/org/apache/struts/action RequestProcessor.java
  Log:
  Patch for Bug 8792
  Submitted by Jens Viebig & Yannic Lamothe  to fix.
  May have to undo if it gives Tomcat 3.3 users problems ???
  
  java.lang.ClassCastException:
  org.apache.struts.upload.MultipartRequestWrapper
  
  the new RequestProcessor Class. It does not unwrap
  the Request from the MultipartRequestWrapper
  
  Revision  Changes    Path
  1.11      +10 -4     
jakarta-struts/src/share/org/apache/struts/action/RequestProcessor.java
  
  Index: RequestProcessor.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/action/RequestProcessor.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- RequestProcessor.java     25 Jun 2002 01:30:40 -0000      1.10
  +++ RequestProcessor.java     26 Jun 2002 18:49:17 -0000      1.11
  @@ -391,6 +391,11 @@
               return;
           }
   
  +        //unwrap the multipart request if there is one
  +        if (request instanceof MultipartRequestWrapper) {
  +            request = ((MultipartRequestWrapper) request).getRequest();
  +        }
  +
           String path = forward.getPath();
           if (forward.getRedirect()) {
               if (path.startsWith("/")) {
  @@ -962,6 +967,7 @@
                                HttpServletResponse response)
           throws IOException, ServletException
       {
  +
           RequestDispatcher rd = getServletContext().getRequestDispatcher(uri);
           if (rd == null) {
               response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
  
  
  

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

Reply via email to