Hi, I am trying to call a Spring MVC controller through an ajax call from JavaScript method.The javascript method is using Prototype library to make the ajax call.The controller throws JSP as output. I am able to hit the controller as i can see in the log messages however the response seems to get lost.What could be the issue.Here is the code....
<script language="JavaScript" src="prototype-1.6.0.3.js"></script>
function submitNewAjxCall() {
alert('test');
new Ajax.Request('SimpleApp/home.htm',
{
method:'post',
parameters: $('formId').serialize(true),
onComplete: showresult
});
}
function showresult(resultdata) {<br>
alert(resultdata.responseText); ****//this method is not called.....****<br>
}<br>
home.htm point to this controller
public ModelAndView handleRequest(HttpServletRequest request,
HttpServletResponse response) throws Exception {
System.out.println("HomeController : " + ++i);
return new ModelAndView("home");
} --- this throws home.jsp
Thanks for your help.