I am using the Commons FileUpload package to upload a file to the server.
I have executed my Servlet with Firefox, Chrome and Safari without any problem.
But when I try with IE8, it fails as the request does not seems to contain the data and upload.parseRequest(request) returns and empty List.
I wonder whether I am missing anything.
This is my code:
I am running on apache-tomcat-7.0.27 and the libraries I am using are: commons-fileupload-1.2.2.jar, commons-io-2.1.jar
If it does not work in IE and works on other browsers, then probably you need to use F12 Developer tool of IE and see how does the request look like in IE.
The way IE reads path info is quite different than ff/chrome.
I recently implemented apache file upload and has 7.0.27 TC and its working fine for me.Atleast till now
Thanks Kiran, when debugging JAVA I can already see that no field is actually being sent in the request object.
The Iterator in line 20 of the servlet is empty as parseRequest(req) does not find any field.
However I am not able to guess what is wrong with my HTML for IE8 not to send the fields through
I think it is an issue with the HTML encoding as no parameter is being send via POST.
Kiran, do you still have a sample of this HTML so I can have a look? Thanks
I been years I have done scriplets and development though now a days I spending hell lot of timeIdeall figuring things out myself.
you are using button type submit which is different than regular input type submit.Form elements works differently.Can you try changing button type submit as form type submit.
<input type ="submit"> this one fires event which gets attached to action element. and button type="submit" means you need to attach onclick event to this.
I am surprised its working in other browsers for you.
Post by:autobot
Paper jam tastes about as you would expect. Try some on this tiny ad:
a bit of art, as a gift, the permaculture playing cards