A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Java EE 7 Tutorial Volume 1 or Volume 2
this week in the
jQuery UI in Action
MultipartHttpServletRequest File upload problem
Joined: Jan 16, 2009
Jul 16, 2009 07:38:10
I'm trying to upload a file, but I keep getting a null MultipartFile back.
The controller code:
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest)request; MultipartFile multipartFile = multipartRequest.getFile("configFile");
<input type='file' name='configFile' />
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> <property name="maxUploadSize" value="100000"/> </bean>
I don't need to store the file, I only extract the content, thats all. If you have any questions about the code feel free to ask.
Poor is the man whose pleasures depend on the permission of another.
rocket mass heater
subject: MultipartHttpServletRequest File upload problem
File Download via Spring does not work in Firefox
Problem with File uploading from popup
how to handle file uploads in spring
file uploading problem ( greater than 2MB)
Unable to upload file
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014