Pergunta

Estou usando o spring 3.2.2.RELEASE e tenho um problema ao enviar solicitação ao servidor:

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

Status HTTP 404 O recurso solicitado não está disponível.

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

onde eu liguei:

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

despachante:

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

Solução

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

removendo .html e usando requestparam resolvi meu problema

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top