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 ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

problem with commons FileUpload

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

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.

Thanks
Raj
 
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">

hth,
sunitha
 
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