Error “Unable to process parts as no multi-part configuration has been provided” when uploading file [duplicate]

折月煮酒 提交于 2019-12-01 15:51:52

问题


I am trying to upload an file via a form in a JSP file, but I'm getting this error. The servlet already has the @MultipartConfig notation. I'm using servlet 3.0 and apache tomcat 8.

Error message:

java.lang.IllegalStateException: Unable to process parts as no multi-part configuration has been provided

on line

Collection<Part> parts = request.getParts();`

回答1:


I had to add

allowCasualMultipartParsing="true"

on context tag inside context.xml



来源:https://stackoverflow.com/questions/24578680/error-unable-to-process-parts-as-no-multi-part-configuration-has-been-provided

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!