首先你看看你的包是不是
import org.springframework.web.servlet.ModelAndView;
然后如果是你在你的index.jsp中写了你想访问的超链接,点击并且出现下面这种错误
SpringMVC中ModelAndView报出404
那应该是你在你的index.jsp文件的超链接里面这样写的
< a href="/hello.do">,通过上面图片的域名我们看到没有我们的tomcat的虚拟路径,所以应该这样写超链接
< a href=“http://localhost:8080/SpringMVC_day1/hello.do”>
或者这样写
< a href="/SpringMVC_day1/hello.do">

相关文章:

  • 2022-12-23
  • 2019-11-16
  • 2021-09-16
  • 2021-09-10
  • 2021-11-15
  • 2021-10-14
  • 2021-04-27
  • 2022-03-08
猜你喜欢
  • 2021-09-20
  • 2022-12-23
  • 2021-06-12
  • 2022-12-23
  • 2021-09-06
  • 2021-09-26
  • 2022-02-04
相关资源
相似解决方案