运行springmvc时出现如下错误org.springframework.web.servlet.DispatcherServlet noHandlerFound

出现错误:八月 12, 2018 10:46:42 上午 org.springframework.web.servlet.DispatcherServlet noHandlerFound
警告: No mapping found for HTTP request with URI [/agcloud/jsp/login.do] in DispatcherServlet with name 'agcloud'

并且页面跳转时出现404

运行springmvc时出现如下错误org.springframework.web.servlet.DispatcherServlet noHandlerFound_第1张图片

解决办法:是因为访问路径出现问题

原来写的访问.do的方式是:

这里应该改成: ../login.do" method="post">

因为访问.do的路径应该是:http://localhost:8080/agcloud/login.do

而上面图片中的路径为:http://localhost:8080/agcloud/jsp/login.do(这个是错误的)

你可能感兴趣的:(springmvc错误,错误地方)