I understood what you want. If you don't want to refresh the page every time record is processed you need Ajax. But it is not possible to show processed records one by one, because you have to send requests to the server one by one. It means that you have to have all of the parameters like JS variables in order to be able to send them to the servlet(your ajax servlet).
Other solution is to call the servlet through a function with timeout (see my link above) and the server should return to you xml with customer id's processed in the meantime.
After that add each one of those records in a table throught JS :
for (i=0; i < custIdArray.length; i++) {
oTR = tblDocs.insertRow();
oTD = oTR.insertCell(0);
oTD.innerHTML = 'Record for ' + custIdArray[i] + ' submitted and mail sent successfully';
}