How To Accept String Return From Controller In Ajax Call
I have a jsp page say something like this
Connection not Enabled
Solution 1:
In your success function you'll want to display this newly called data, by changing:
$("#result").html("connection has been enabled successfully");
To:
$("#result").text(data);
Solution 2:
url:contextPath +"/submitAllInfo",
this url is not matching with below action
@RequestMapping(value = "/action", method = RequestMethod.POST)
and also you passing data
from your ajax request
but there is nothing to handle in controller method
String insertAllStepDetails()
it should be like
String insertAllStepDetails(@ModelAttribute("formData") AnyClass obj)
orString insertAllStepDetails(HttpServletRequest request)
And also remove processData: false,
from ajax request
Post a Comment for "How To Accept String Return From Controller In Ajax Call"