GeeCON Prague 2014*
The moose likes Other Open Source Projects and the fly likes problem with commons FileUpload Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "problem with commons FileUpload" Watch "problem with commons FileUpload" New topic
Author

problem with commons FileUpload

Raj Mehta
Greenhorn

Joined: Apr 26, 2004
Posts: 11
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
sunitha reghu
Ranch Hand

Joined: Dec 12, 2002
Posts: 937
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
Senthil B Kumar
Ranch Hand

Joined: Feb 09, 2004
Posts: 140
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.


Work like you don't need the money. Love like you've never been hated. Dance like nobody's watching. Sing like nobody's listening. Live like it's Heaven on Earth.
Currently I Reside Here WEBlog
 
GeeCON Prague 2014
 
subject: problem with commons FileUpload