November 2016
Intermediate to advanced
944 pages
21h 1m
English
Most web applications require multipart file upload functionality. Spring MVC makes it extremely easy to handle this otherwise cumbersome feature. It provides two built-in implementations of MultiPartResolvers: CommonsMulipartResolver for Apache Commons FileUpload and StandardServletMultipartResolver for the Servlet 3.0 API.
Since most modern web applications use a Servlet 3.0 container, let's see how the FileUpload functionality can be handled using StandardServletMultipartResolver with the help of following example:
MultipartResolver in your servlet-context.xml file (or add it programmatically if you are using a Java configuration):<beans:bean id="multipartResolver" class="org.springframework.web.multipart.support.StandardServletMultipartResolver"> ...
Read now
Unlock full access