Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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();`
like image 305
user3361891 Avatar asked Jul 04 '14 17:07

user3361891


1 Answers

I had to add

allowCasualMultipartParsing="true"

on context tag inside context.xml

like image 74
user3361891 Avatar answered Oct 26 '22 06:10

user3361891