Getting “WARN org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI …” when trying to setup spring servlet

后端 未结 3 508
萌比男神i
萌比男神i 2021-01-25 07:56

I am trying to setup a Spring MVC project. I have added a dispatcher servlet, a jsp and setup the web.xml file. But I keep getting

WARN org.springframew

3条回答
  •  遇见更好的自我
    2021-01-25 08:34

    I had a similar issue before which was very confusing, after a series of tests, I found it's the url-pattern for the DispatcherServlet. Be cautious when you use the asterisk for wildcard match which might lead to unexpected behavior, and it's just safe to start from root "/" or your custom servlet context path "/foo/"

    Try the following.

    
      HelloWeb
      /
    

提交回复
热议问题