Error “Unable to process parts as no multi-part co

2020-04-05 02:35发布

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条回答
Deceive 欺骗
2楼-- · 2020-04-05 03:20

I had to add

allowCasualMultipartParsing="true"

on context tag inside context.xml

查看更多
登录 后发表回答