javascript - How to fix (Error: parsererror errorThrown: SyntaxError: Unexpected token < )using java action -


var duepaymentdebtdate = "02/02/2015";  $.getjson("checkdateajaxtojson.action",{"duepaymentdebtdate":duepaymentdebtdate},      function(json){           alert(json);      }).error(function(jqxhr,textstatus, errorthrown){              console.log("error: " + textstatus + " errorthrown: " + errorthrown);           }); 

this code want in action , json doesn't return result , show message error in console these :

error: parsererror errorthrown: syntaxerror: unexpected token < 

anybody can me?

check server side logs , code.

  • try surround "checkdateajaxtojson.action" core business process try/catch.

maybe server-side code in error , produce default error 5xx html result.


Comments