Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-236

ActionForm.validate method fails with multipart request

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.0 Beta 3
    • Fix Version/s: 1.0.0
    • Component/s: Core
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: Other
    • Bugzilla Id:
      2039

      Description

      Problem: The validate(mapping, request) method on the ActionForm class is
      not completing sucessfully in Struts 1.0b3 where it was in Struts 1.0b1.

      Detail: This is a multipart form that has a couple of struts file upload
      controls on it (as well as text fields etc) so I suppose that might be related
      somehow.
      The exception being thrown in the log is :-

      java.lang.ClassCastException:
      org.apache.struts.upload.MultipartRequestWrapper
      at
      org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
      .java:144)
      at
      org.apache.struts.action.ActionServlet.processValidate(ActionServlet.java:21
      37)
      at
      org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)
      at
      org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at
      org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
      at org.apache.tomcat.core.Handler.service(Handler.java, Compiled
      Code)
      at
      org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled
      Code)
      at
      org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
      7)
      at
      org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
      at
      org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
      (Ajp12ConnectionHandler.java:166)

      at
      org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
      Compiled Code)
      at
      org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java,
      Compiled Code)
      at java.lang.Thread.run(Thread.java:479)

      This worked fine under Struts 1.0b1

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              graemem@advantagegroup.co.nz graemem
            • Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: