gpt4 book ai didi

java - 在 Eclipse 中的 tomcat 上使用 Struts 运行 Web 应用程序时出现 404 错误

转载 作者:行者123 更新时间:2023-11-28 22:59:16 24 4
gpt4 key购买 nike

我是使用 struts 进行 Web 开发的初学者。我按照在线教程在 Eclipse 中使用 Struts 制作了一个网络应用程序。教程的链接是 http://www.dzone.com/tutorials/java/struts/struts-tutorial/struts-tutorial-using-eclipse-1.html源代码可用的地方。当我启动服务器并运行应用程序时,尽管我觉得我已经正确地完成了事情,但我还是收到 404 页面未找到错误。我附上了我得到的错误页面。 enter image description here

此外,我还检查了日志中的错误,但除此之外它没有给我任何信息 enter image description here

那么谁能帮我找出应用程序无法运行的原因吗?

struts 配置文件 enter image description here

最佳答案

删除 HelloWorlAction.classHelloWorldForm.class

在 struts 中,您只需要一个带有 java 扩展的 Action 类和表单类。

所以你只需要:

HelloWorlAction.java
HelloWorlActionForm.java

关于java - 在 Eclipse 中的 tomcat 上使用 Struts 运行 Web 应用程序时出现 404 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21959686/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com