JavaScript 메서드에서 ajax 호출을 통해 스프링 MVC 컨트롤러를 호출하려고합니다. 자바 스크립트 메서드는 Prototype 라이브러리를 사용하여 ajax 호출을 만듭니다. 컨트롤러는 JSP를 출력으로 throw합니다. 나는 응답이 실종 됐어 뭐라는 issue.Here이 코드가 될 수 얻을 것으로 보인다 그러나 내가 로그 메시지에서 볼 수있는 컨트롤러를 칠 수 있어요 ....스프링 MVC 및 프로토 타입 JavaScript
function submitNewAjxCall() {
alert('test');
new Ajax.Request('SimpleApp/home.htm',
{
method:'post',
parameters: $('formId').serialize(true),
onComplete: showresult
});
}
function showresult(resultdata) {
alert(resultdata.responseText); ****//this method is not called.....****
}
home.htm 포인트 이 컨트롤러로 도움을
public ModelAndView handleRequest(HttpServletRequest request,
HttpServletResponse response) throws Exception {
System.out.println("HomeController : " + ++i);
return new ModelAndView("home");
} --- this throws home.jsp
감사합니다.
:) – skaffman