Skip to content Skip to sidebar Skip to footer

Success Callback Function Is Not Called When Ajax Call To Servlet

I am trying to make dependent drop down list. For that I have created a jsp page and in that calling servlet through ajax call .In the servlet I am using Json object for returning

Solution 1:

Send a response even if an exception is thrown

catch (Exception e) 
{
    // TODO Auto-generated catch block
    e.printStackTrace();
    //send the response
    out.print(e.getMessage());
}

You can have a detailed description of the error with:

error: function(theRequest, theStatus, theError) 
 {
    alert(theRequest.responseText);
}

instead of

error : function() {

        alert("Error");
          }

Post a Comment for "Success Callback Function Is Not Called When Ajax Call To Servlet"