可能重复:
There is no Action mapped for namespace / and action name tutorial
当我尝试点击我的Struts 2操作时,收到以下错误消息:
There is no Action mapped for namespace / and action name getTutorial. - [unknown location]
我正在使用Eclipse indigo IDE,Tomcat 7和JDK 1.7。我包含的jar文件是commons-logging-1.0.4.jar,freemarker-2.3.8.jar,ognl-2.6.11.jar,struts2-core-2.0.11.jar,xwork-2.0.4.jar。我把struts.xml放在WEB-INF的classes文件夹中,我也尝试将它放在
中
src文件夹,但我无法做到。
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration
2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="default" extends="struts-default">
<action name="tutorial" class="com.test.TutorialAction">
<result name="success">/success.jsp</result>
<result name="failure">/failure.jsp</result>
</action>
</package>
</struts>