SpringBoot: Large Streaming File Upload Using Apache Commons FileUpload

Thanks to some very helpful comments by M.Deinum, I managed to solve the problem. I have cleaned up some of my original post and am posting this as a complete answer for future reference. The first mistake I was making was not disabling the default MultipartResolver that Spring provides. This ended up in the resolver … Read more

File upload with ServletFileUpload’s parseRequest? [duplicate]

As I said in a comment to the same question, you posted earlier, this is most likely because you have parsed the request already before. The files are part of the request body and you can parse it only one time. Update: I usually do use commons-upload in that way: if (ServletFileUpload.isMultipartContent(request)) { ServletFileUpload fileUpload … Read more

java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest

This can happen when you’ve placed server-specific libraries in the webapp’s /WEB-INF/lib or probably JRE/lib. Big chance that you copied Tomcat’s /lib/servlet-api.jar into there. You shouldn’t do that. This would only lead to collisions in the classpath which leads to this kind of errors and it will make your webapp unportable (i.e. it is tied … Read more