Javascript 有人在春季MVC中帮助我了解ajax吗

Javascript 有人在春季MVC中帮助我了解ajax吗,javascript,ajax,spring,jsp,Javascript,Ajax,Spring,Jsp,//在浏览器中运行时,ajax不起作用 xmlHttp.onreadystatechange = stateChanged; xmlHttp.open("GET", url, true); xmlHttp.send(null) } and a file JSP loginAjax.jsp to access database : Ajax是创建异步Web应用程序的客户端技术。这里的错误是404。因此,Ajax确实有效。但是服务器中没有相应的资源。那么您能告诉我在spri

//在浏览器中运行时,ajax不起作用

    xmlHttp.onreadystatechange = stateChanged;
    xmlHttp.open("GET", url, true);
    xmlHttp.send(null)
}
and a file JSP loginAjax.jsp to access database :

Ajax是创建异步Web应用程序的客户端技术。这里的错误是404。因此,Ajax确实有效。但是服务器中没有相应的资源。

那么您能告诉我在spring中从Ajax调用控制器的请求吗?例如:我认为:我将在我的控制器中创建@RequestMapping/user,ajax将调用$.ajax{url:'user.jsp',//我认为这将映射到//@RequestMapping/user data:{name:'luong',success:functiondata{$user.htmldata;};
    xmlHttp.onreadystatechange = stateChanged;
    xmlHttp.open("GET", url, true);
    xmlHttp.send(null)
}
and a file JSP loginAjax.jsp to access database :
and in console of Browser :
error: GET http://localhost:8899/SpringMVCHibernateTransaction/%3Cc:url%20value= 404 (Not Found)