Why Template “Spring MVC Project” in “SpringSource Tool Suite” not work with Tomcat?

后端 未结 4 2035
陌清茗
陌清茗 2021-01-03 07:25

When Im create Spring MVC Template project in SpringSource Tool and try to Run on the Tomcat server I have this error:

WARN : org.springframework.web.servlet         


        
4条回答
  •  梦毁少年i
    2021-01-03 08:05

    It looks to me like the url you're trying to hit is "/test/" and the web.xml is only mapping "/". You could change that to "/*" if you want spring to handle all urls, and then you'd also have to change your home controller to be "/test".

    Or you could just hit the url "http://localhost:8080/" which is the root URL that you have mapped to the home controller.

提交回复
热议问题