Use the low-level $.ajax() call:
$.ajax({ url: "/yourservlet", data: { }, complete: function(xmlHttp) { // xmlHttp is a XMLHttpRquest object alert(xmlHttp.codestatus); } }); Try this for a redirect:
if (xmlHttp.code != 200) { top.location.href = '/some/other/page'; }