Test Case Boilerplate

Fork this way...

HTML

<div id="errorList">
    <p>errors:</p>
</div>

JavaScript

function sendTest(){
    $.ajax({
        url: "ajaxResource.jsp",
        type: "POST",
        error: function(jqXHR, textStatus, errorThrown){$("#errorList").append(jqXHR.status);}.
        success: function(data, textStatus, jqXHR){$("#errorList").append(jqXHR.status);
        /// even if the status code is 0 this is fired}
    });
}

setInterval(sendTest,200);