Stato HTTP 404 Poggia a molla La risorsa richiesta non è disponibile
-
21-12-2019 - |
Domanda
Sto usando la primavera 3.2.2.Release e ha un problema sull'invio di richiesta al server:
http://asdsda:8080/spr-mvc-hib/user/userHizmet.html?userId=19
.
Stato HTTP 404 La risorsa richiesta non è disponibile.
@RequestMapping(value = "/userHizmet/{userId}", method = RequestMethod.GET)
public ModelAndView userHizmet(@PathVariable String userId)
{
ModelAndView mav = new ModelAndView("userte");
.
dove ho chiamato:
success: function (data) {
alert(data);
window.location.href="${pageContext. request. contextPath}/user/userHizmet.html?userId="+data;
},
.
Dispatcher:
Dynamic servlet = servletContext.addServlet("dispatcher", new DispatcherServlet(ctx));
servlet.addMapping("/");
. Soluzione
localhost:8080/spr-mvc-hib/user/userHizmet.html?userId=19
.
Rimozione .html
e utilizzando requestparam
ha risolto il mio problema
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow