I\'ve seen couple of qts on the same topic. But I didn\'t find any clue of this error.
I am working on a POC and following the link below. http://spring.io/guides/gs/upl
There are 2 things you need to do:
First, add the Apache Commons FileUpload library to your class path. If you use maven, you can get the dependency here. If you don't, you can still download the jar and add it manually.
Second, you have to declare a MultipartResolver
bean in your context with name multipartResolver
. With Apache Commonds FileUpload, you can use CommonsMultipartResolver
. For example, with Java config, that would be
@Bean(name = "multipartResolver")
public CommonsMultipartResolver multipartResolver() {
CommonsMultipartResolver commonsMultipartResolver = new CommonsMultipartResolver();
// set any fields
return commonsMultipartResolver;
}
With XML config,
<bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<!-- set any properties -->
</bean>
This is further documented in the Spring official documentation.