1

我正在使用 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("/");
4

1 回答 1

1
localhost:8080/spr-mvc-hib/user/userHizmet.html?userId=19

删除.html和使用requestparam解决了我的问题

于 2014-04-26T15:20:58.177 回答