From the course: Complete Guide to Spring MVC

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Data handling: Multipart Resolver

Data handling: Multipart Resolver - Spring Tutorial

From the course: Complete Guide to Spring MVC

Data handling: Multipart Resolver

- [Instructor] "Data Handling: Multipart Resolver." Multipart requests are HTTP requests that contain multiple parts, often used for file uploads. Spring MVC provides MultipartResolver interface to handle such request. The StandardServletMultipartResolver is a container-based implementation that leverages the Servlet container's built-in multipart handling capabilities. Remember, I said for this course, everything's going to build on top of each other. So thankfully, we've reviewed what servlet means and how that relates to our DispatcherServlet, and now we are in the MultipartResolver aspect. So, how do we use all these pieces that come together? Well, one, you're going to want to enable servlet multipart parsing. So in Java configuration, it would look something like we have here where we have registration.setMultipartConfig and we call out the config there. Next, in web.xml, again, this is for more enterprise or legacy applications. Here is an example of where you can enable your…

Contents