Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

problem with commons FileUpload

Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am trying to use the apache fileUpload to parse multipart request. But it is ignoring all the form elements upto and including the the first file element.

This is the html code

This is the JSP code (which parses the request)

I found this code in some online tutorial. When i submit the form to the jsp it only prints out file2 & file3. If i have more form elements before file1 even they are ignored.

Has anyone encountered such a problem before ?? Btw i am running this under WSAD.

Ranch Hand
Posts: 937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if the enctype is multipart/form-date it will take only file field. <FORM name="filesForm" action="temp.jsp" method="post" enctype="multipart/form-data">

Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've not used that Upload component.

but if you have the enctype as multipart, it doesnt mean that you can have only 1 file component or only one form component. That is wrong.
    Bookmark Topic Watch Topic
  • New Topic