Relative Content

Tag Archive for javascriptajaxjsfprimefaces

Sending Ajax request multiple times by clicking commandButton in javascript loop

I have a problem due to server restrictions. The server allows only data under 25MB to be transmitted. The data that is supposed to be uploaded is 80MB+. I’m working with JSF, Primefaces and JavaEE.
My idea was to send the data in small packages via AJAX requests. The data is split into small enough chunks, but when I click the commandButton that is supposed to execute the AJAX as often as there are chunks, it sends the first data chunk with the correct content and then it only sends the content of the last chunk in every request.