• 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
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic