Pages

Showing posts with label NullPointerException.. Show all posts
Showing posts with label NullPointerException.. Show all posts

Monday, August 13, 2012

Spring MVC file upload NullPointerException

Took me hours to figure out and in the end I realized I just had to add this small piece of resolver in my dispatcher-servlet.


    <bean id="multipartResolver"
          class="org.springframework.web.multipart.commons.CommonsMultipartResolver">

        <!-- one of the properties available; the maximum file size in bytes -->
        <property name="maxUploadSize" value="100000"/>
    </bean>