我的Struts2应用程序获取错误404:资源不可用

时间:2013-12-22 07:19:30

标签: java struts2

我只是在尝试我的第一个struts2应用程序。按照教程中的步骤进行操作。链接

    http://localhost:8080/StrutsApp/ 

和链接

    http://localhost:8080/StrutsApp/getTutorial.action

两者都提供相同的“资源不可用”错误。我已经添加了错误,目录结构,struts.xml,web.xml和tutorialaction类所需的图像。还可以在目录结构中看到添加的jar(来自apache的最新版本)。 有人可以帮我解决这个问题吗?

我的IDE: Eclipse Kepler

服务器: Apache Tomcat 7.0

The error

enter image description here

struts.xml

web.xml

Tutorial action class

1 个答案:

答案 0 :(得分:4)

问题解决了。谢谢你的帮助。 struts2 zip文件中有两个名字几乎相似的公共罐子,如下所示:

  1. 公地琅x.x.jar
  2. 公地lang3-x.x.jar
  3. 其中x.x是版本号。注意第二个jar中lang之后的 '3' ,第一个jar中没有。 我的应用程序中缺少第二个commons-lang3-x.x.jar。只是Web-inf / lib文件夹中的第一个。

相关问题