1

我正在尝试通过 eclipse 在 tomcat 服务器上运行 index.jsp 文件。但是,当我运行该文件时,我收到 HTTP STATUS 404 错误。我检查了多个设置,但无济于事。URL 是http://localhost:8080/LoginApp/index.jsp 到目前为止,我检查过我能记住的是:

1.web.xml 在欢迎文件中包含 index.jsp

2.》使用Tomcat安装(控制Tomcat安装

3. http://localhost:8080工作正常。

4.console 显示关于源的警告(非错误)

Setting property 'source' to 'org.eclipse.jst.jee.server:NewLoginSystem' did not find a matching property

5.index.jsp 保存在WebContent 文件夹中。

任何指导将不胜感激。

4

2 回答 2

1

希望这可以解决其他人的问题。我不明白为什么会发生这种情况,所以也许有人可以解释这一点,但我让 tomcat 在 xampp 上运行。通过从 xampp 卸载 tomcat,我的 index.jsp 文件按预期加载。

于 2013-05-28T02:21:46.537 回答
0

您的 index.jsp 文件应该位于 web-content 目录中,以便可以访问它...

还请查看您的上下文根目录,以便仔细检查您应该用来访问 Web 应用程序的路径:如何在 Eclipse 中更改动态 Web 项目的上下文根目录?

于 2013-05-28T01:02:05.153 回答