I have a pretty simple JSP/Servlet 3.0/Spring MVC 3.1 application.
On one of my pages, I have multiple forms. One of these forms allows the user to upload a file and
Since I found no way to set the default encoding using the StandardMultipartResolver
, I dumped the servlet 3.0 config and went for the good old CommonsMultipartResolver
.
I configured it like this in my spring servlet context:
In the end, there isn't much difference, since under the hood of the StandardMultipartResolver
, it just delegates to CommonsMultipartResolver
.
I actually find the servlet 3.0 approach more troublesome, since it requires configuration in both web.xml and your servlet context, and you lose the ability to set the default encoding.