How can I handle multipart/form-data POST requests in my java servlet?

前端 未结 3 590
情话喂你
情话喂你 2020-12-07 02:28

I\'m having a very hard time dealing with multipart/form-data requests with my java application server. From what I have found out, the servlet 3.0 specification provides m

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-07 02:50

    Tomcat 6 does not and will not support Servlet Specification 3.0. You should attempt doing this on Tomcat 7, but I'm not really sure whether this functionality is present in the beta release that is currently available. The functionality is expected to be present in the production release though.

    You could continue using Apache Commons FileUpload like posted in the other answer, or you could use Glassfish (depending on the current phase and type of your project).

提交回复
热议问题