JEE设置默认JSP页面 报错The origin server did not find a current representation for the t

  • 出现这样的错误有多种缘由,本次我所解决的是没有设置默认加载及视频页面。
  • 简单阐述更改经验及心理路程,在出现这个错误的时候我就蒙了,我之间建立的一个项目就能够加载,如今建立一个项目就无法加载了,跟奇怪的是我输入localhost:8080就能够加载 如图:
    以后输入localhost:8080:/Shopping/admin/login.jsp 就会出现这种状况 如图:

我在查了不少资料后,发现多是没有配置web.xml 打开web.xml果真是没有配置,如图:

  • 以后在添加配置后就能够运行了
<display-name>Shopping</display-name>
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>default.html</welcome-file>
        <welcome-file>default.htm</welcome-file>
        <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>
复制代码

  • 最后输入路径 运行结果如图:

总结

  • 遇到Bug不要方,不要方,不要方
  • 多思考,查资料
  • 要有耐心
相关文章
相关标签/搜索