When loading a JSP page in Firefox, I am invoking an AJAX function that calls a servlet. The servlet returns data in response. However, when I attempt to alert the data as shown in the code snippet below, I receive a null value.
$.ajax({
url : 'Servlet?methodName=A',
type : "POST",
datatype : 'json',
success : function(data) {
alert(data);
var obj = $.parseJSON(data);
}
});