HTTP状态404 Spring Rest请求的资源不可用
-
21-12-2019 - |
题
我使用spring 3.2.2.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("/");
. 解决方案
localhost:8080/spr-mvc-hib/user/userHizmet.html?userId=19
.
删除.html
并使用requestparam
解决了我的问题
不隶属于 StackOverflow