• 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
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

problem with commons FileUpload  RSS feed

 
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.
 
What are your superhero powers? Go ahead and try them on this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!