【问题标题】:Tomcat not picking the showing 404 on index.htmlTomcat 没有选择 index.html 上显示的 404
【发布时间】:2014-03-22 19:11:33
【问题描述】:

我是服务器和构建 Web 应用程序的新手。 当我在 netbeans 的 web pages 文件夹下的 myproejct 中创建新的 html 文件并编译该文件时,它显示 404 错误并带有以下 URL

http://localhost:8080/myproject/

但是当我将此网址更改为

http://localhost:8080/myproject/index.html

它显示页面..

当创建 index.jsp 而不是 index.html 并在 netbeans 中编译时,它会显示在浏览器中

为什么会这样???? 有什么提示吗??

【问题讨论】:

标签: java jsp tomcat netbeans


【解决方案1】:

你的 index.html 是在WEB-INF 还是WebContent 下?

它应该在WebContent 文件夹下,并且在您的 web.xml 中正确映射。

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2012-06-10
  • 1970-01-01
  • 1970-01-01
  • 2015-10-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-03-29
相关资源
最近更新 更多