A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCA Java SE 8 Programmer I Study Guide 1Z0-808
this week in the
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.
I agree. Here's the link:
subject: MultipartHttpServletRequest File upload problem
Problem with File uploading from popup
File Download via Spring does not work in Firefox
file uploading problem ( greater than 2MB)
how to handle file uploads in spring
Unable to upload file
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015