我正在使用spring 3.2.2.RELEASE并且在向服务器发送请求时遇到问题:
http://asdsda:8080/spr-mvc-hib/user/userHizmet.html?userId=19
HTTP状态404请求的资源不可用。
@RequestMapping(value = "/userHizmet/{userId}", method = RequestMethod.GET)
public ModelAndView userHizmet(@PathVariable String userId)
{
ModelAndView mav = new ModelAndView("userte");
我打电话的地方:
success: function (data) {
alert(data);
window.location.href="${pageContext. request. contextPath}/user/userHizmet.html?userId="+data;
},
调度员:
Dynamic servlet = servletContext.addServlet("dispatcher", new DispatcherServlet(ctx));
servlet.addMapping("/");
答案 0 :(得分:1)
localhost:8080/spr-mvc-hib/user/userHizmet.html?userId=19
删除.html
并使用requestparam
解决了我的问题