Pregunta

Estoy usando Spring 3.2.2.Release y tenemos un problema en enviar solicitud al servidor:

http://asdsda:8080/spr-mvc-hib/user/userHizmet.html?userId=19 

Estado http 404 El recurso solicitado no está disponible.

@RequestMapping(value = "/userHizmet/{userId}", method = RequestMethod.GET)
public ModelAndView userHizmet(@PathVariable String userId)
{
    ModelAndView mav = new ModelAndView("userte");

donde llamé:

success: function (data) {
                        alert(data);
                        window.location.href="${pageContext. request. contextPath}/user/userHizmet.html?userId="+data;
                    },

Despachador:

Dynamic servlet = servletContext.addServlet("dispatcher", new DispatcherServlet(ctx));
    servlet.addMapping("/");

¿Fue útil?

Solución

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

Eliminación de .html y usando requestparam resolvió mi problema

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top