Background:
I am looking for a tool to upload big file asynchronously using Ajax + Struts 2, I was able to do the same thing using servlet but when I modify the logic to call Struts action. I have noticed that when I try to upload a huge file using Struts 2 action, it doesn't get called from jQuery ajaxForm(options);
I have used the sample code specified on the below link this works perfectly fine. http://www.simplecodestuffs.com/file-upload-with-progress-bar-using-jquery-in-servlet/
Can anyone tell if below jQuery function call is correct for upload functionality.
$("#uploadtest").ajaxForm(options);
I tried but it is not working as expected in one particular browser when huge data is uploaded. (That is, client ajax call occurs, however, the corresponding Struts 2 action is not getting called in the backend, logs are not generated on the server side).
I am not able to understand why Struts 2 action is not getting called when jQuery ajaxform
to upload huge file (multipart upload functionality).
jQuery:
$("#uploadtest").ajaxForm(options);
JSP snippet:
<s:form id="uploadtest" name="uploadform" action="aStrutsAction" method="post" enctype="multipart/form-data">
Similar question is asked here.