There is no Action mapped for namespace /stu and action name showStu. - [unknow
2013-04-16 10:38:28,437 ERROR [org.apache.struts2.dispatcher.Dispatcher]- <Could not find action or result>
There is no Action mapped for namespace /stu and action name showStu. - [unknown location]
at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:178)
at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)
at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:47)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:478)
at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:879)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:600)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1703)
at java.lang.Thread.run(Thread.java:619)
action --------------------编程问答-------------------- 有谁知道这是怎么回事啊 --------------------编程问答-------------------- 页面请求地址对了的 /ST/stu/showStu.action
ST是项目名 /stu是namespace
我的struts.xml没有放在src下面 但是我web。xml里面配置正确了的
能够读取到,为什么总是报这个错误啊求解!!!
--------------------编程问答-------------------- 你可以试着将xml文件放在src目录下再测试呢? --------------------编程问答-------------------- form表单看看 --------------------编程问答-------------------- 除 --------------------编程问答-------------------- 1、你路径写的有问题
2、你没有配置这个action --------------------编程问答-------------------- <servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<!-- Default -->
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<!-- stumodule -->
<init-param>
<param-name>config/stu</param-name>
<param-value>/WEB-INF/stu/struts-config.xml</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet> --------------------编程问答--------------------
module配置错了。 --------------------编程问答-------------------- There is no Action mapped for namespace /stu and action name showStu
按你说的,配置在web.xml中了,但是有没有加载或加载成功呢
这个错误就是告诉你在命名空间/stu中找不到action showStu
多数配置加载有问题
补充:Java , Web 开发