Posted By:
tom_george
Posted On:
Thursday, May 26, 2011 12:28 PM
I have a Struts 1.2 application that uses file upload in one of the pages. Before adding the ` ` field and changed form type to `multipart/form-data` everything was ok. I was submitting the form through Javascript upon pressing a button. Now, with the input file in place and corresponding form type, when I press the button, the submit is not performed anymore. Nothing happens. Submission code is something like this: myForm = document.getElementById('form1'); myForm.action = '/myproject/myaction.do'; myform.submit(); I remove the field and the `multipart/form-data` type and everything was fine again. Then I just added `multipart/form-data` to the field and submit did not work again. I alr
More>>
I have a Struts 1.2 application that uses file upload in one of the pages.
Before adding the `
` field and changed form type to `multipart/form-data` everything was ok. I was submitting the form through Javascript upon pressing a button.
Now, with the input file in place and corresponding form type, when I press the button, the submit is not performed anymore. Nothing happens. Submission code is something like this:
myForm = document.getElementById('form1');
myForm.action = '/myproject/myaction.do';
myform.submit();
I remove the field and the `multipart/form-data` type and everything was fine again. Then I just added `multipart/form-data` to the field and submit did not work again.
I already spent several hours with this issue and I cannot find a solution. It seems really stupid and maybe you have an idea of what's going on.
Updated status:
I've installed live http headers plugin in Firefox and I noticed:
- the form gets submitted (even though it will not call my Action class execute)
- the server returns
HTTP/1.1 204 No Content Server:
Apache-Coyote/1.1 X-Powered-By:
Servlet 2.4; ....