1 Reply Latest reply on Apr 21, 2015 12:50 PM by jsnielson

    multipart/form-data requests

    jsnielson

      I am using jboss-eap-6.2, SEAM 2.3.1.Final, and RichFaces 4.5.4 Final.

      A third party is POSTing a content-type “multipart/form-data” request to a jspx page in my web application.  Parameters are passed/injected through @RequestParameter to the page.  The request works when the content-type is “application/x-www-form-urlencoded”, but not when it is “multipart/form-data”.  I can see the correct content-type and content-length in the request object when it comes through, but am not able to access any of the parameters or attached file.  I’ve also programmatically built the multipart request to simulate what the third part is doing using Apache commons, but the outcome is the same.  This was working before an upgrade of JBoss, Seam, and RichFaces.

      Also, the seam multi-part component is disabled in the components.xml with the following line: <web:multipart-filter disabled="true" />.  Removing it or changing it doesn't change anything.  The web application does use the rich:fileUpload on other pages which are sending multipart requests.  What else is there to multipart requests in this sort of setup?  Any Ideas?

        • 1. Re: multipart/form-data requests
          jsnielson

          There appears to be a conflict with the Seam multi-part filter and the rich:FileUpload which also uses a multipart filter.  I got this to work.  To be able to use both, I set a url-pattern in the components.xml for the Seam Filter that matches the pages (below) that the third party posts to.  This also allows the rich:FileUpload to still work on other pages that don't match the pattern.  Still not sure what changed with the upgrades that were made to the frameworks.

           

            <web:multipart-filter create-temp-files="true" max-request-size="1000000" url-pattern="/EmailProcessing/*"/>