1 Reply Latest reply on Aug 9, 2006 1:58 PM by Eric Ray

    Handling Multipart Request

    B Bozhanov Newbie


      I see Tomcat 5.5 has no implementation for multipart form data parsing. Can anyone tell me how to implement this myself or suggest me a good implemtation. Thanks

        • 1. Re: Handling Multipart Request
          Eric Ray Novice

          You can use the javax.mail.internet.MimeMultipart class to parse the multipart mime body yourself or...

          you can cheat to some degree and use apache commons file-upload to parse the body. it will treat everything as a FileItem, but if the parameters are small enough (like simple string) it will keep them in memory. You will have to access the parts like they were file, but, all the parsing is done for you...or....

          you could look at the FileUploadBase.parseRequest method and see how they are parsing the multipart body and steal from there and make it your own...

          There are probably other packages out there that provide similar behavior.