• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Spring MultipartException: The current request is not a multipart request

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to upload a file with AngularJS and Spring controller. The Angular controller looks like this:



I also try this:



and the Spring controller looks like this:



My html Page looks like this:



I have 2 jars in web-inf/lib:commons-upload.jar and commons-io.jar I add this in my spring configuration file:


When I'm trying to upload a file, I get the error:

When I'm trying to upload a file using MultipartHttpServletRequest in my spring function instead of Multipart i get this error:

When i use HttpServletRequest request and i try to cast it i got a ClassCastException. Nothing change when i cancel enctype="multipart/form-data" from my form Tag.

My error is a server side error.
Any help will be much appreciated
 
Liar, liar, pants on fire! refreshing plug:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic