Could not find action or result: There is no Action mapped for namespace [/] and action name [GetG

Could not find action or result: /car/GetGpsDataAction

There is no Action mapped for namespace [/] and action name [GetGpsDataAction] associated with context path [/car]. - [unknown location]

at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:185)

at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:63)

at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:37)

at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)

at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:552)

at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)

at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)

at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)

at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)

at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2441)

at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2430)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

请检查 struts.xml文件是否放在src文件夹下

<package name="GetGpsData" namespace="" extends="json-default">
	<action name="GetGpsDataAction" class="com.action.GetGpsDataAction">
		<result name="success" type="json">
			<param name="root">listGpsData</param>
		</result>
	</action>
	</package>

注意这里的namespace 命名空间,写成空即namespace=""的话默认从web根文件夹下的src(源文件)開始搜索。也即 "  project名/src/  "   開始搜索,

另外请參考 还有一篇文章  

《 struts.xml文件布置 》

时间: 2024-10-10 06:34:40

Could not find action or result: There is no Action mapped for namespace [/] and action name [GetG的相关文章

HTTP Status 404 - There is no Action mapped for namespace [/] and action name [product-save] associated with context path [/20161101-struts2-2].

运行:index.jsp---->input.jsp----->details.jsp,但是在input.jsp到details.jsp的时候报错误. 异常如下: 严重: Could not find action or result/There is no Action mapped for namespace [/] and action name [] associated with context path []. - [unknown location]at com.opensymp

There is no Action mapped for namespace / and action name 通配符的问题

之前看了一些struts2的视频. 现在复习了下 struts2.发现了这个问题 网上的说的解决办法大都没提到这个问题,1%的文章提到了新版本的struts中 method的问题 There is no Action mapped for namespace / and action name XXX http://localhost:8080/Struts2Learn/loginAction_login.action 原因不详. 解决办法: 通配符  *  的使用方法中. struts-2.5

There is no Action mapped for namespace [/] and action name [xx] associated with context path...

好久没用Struts了,今天练了一个简单的应用,出现了一些意外的问题,由于这种原因一直报404 首先我的目录结构是这样子滴 web.xml中是这样配置的 <web-app> <display-name>Archetype Created Web Application</display-name> <filter> <filter-name>struts2</filter-name> <filter-class>org.a

Struts2中关于&quot;There is no Action mapped for namespace / and action name&quot;的总结

今天在调试一个基础的Struts2框架小程序.总是提示"There is no Action mapped for namespace / and action name"的错误.上网查询后发现这是一个初学者经常碰到的问题,导致错误的原因主要有两种.总结如下: 一.struts.xml文件错误.这种错误又分为以下几种:1,struts.xml文件名错误.一定要注意拼写问 题:2,struts.xml文件放置路径错误.一定要将此文件放置在src目录下.编译成功后,要确认是否编译到clas

There is no Action mapped for namespace [/pages/action/student] and action name [findStudent]

1.错误描述 2014-7-13 2:38:54 org.apache.jasper.compiler.TldLocationsCache tldScanJar 信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were foun

错误There is no Action mapped for namespace / and action name—Struts2

Struts2出现错误,总是提示"There is no Action mapped for namespace / and action name"的错误. 错误代码如下: 09:36:13,515 WARN [Dispatcher] Could not find action or result There is no Action mapped for namespace [/] and action name [css] associated with context path

解决 struts2 报&quot;There is no Action mapped for namespace / and action name&quot;的问题

在配置struts2 入门demo时碰到"There is no Action mapped for namespace / and action name"问题,查了一些资料,但没有完全解决问题, 因为造成此问题的原因有很多, 比如这位博主的文章提到的https://www.cnblogs.com/GeekRegister/articles/4949441.html 我再补充几点调试过程中发现的坑: "There is no Action mapped for namesp

There is no Action mapped for namespace [/] and action name [m_hi] associated with context path []

最近更新struts版本发现,无论怎么访问就是无法映射到指定的配置文件,最后发现原来是访问控制的原因. struts2.3之后为了访问安全,增加了请求方法拦截,这样会造成使用通配符访问时无法找到映射对象的错误提示: There is no Action mapped for namespace [/] and action name [m_hi] associated with context path []. 解决方式: 1 如果你的引用包struts2-core是2.3以上版本需要更新str

关于Struts2中的错误:例如There is no Action mapped for namespace / and action name product-input.

            在配置struts.xml 文件时,会出现    There is no Action mapped for namespace / and action name ....    意思是没有product-input的映射文件或者是命名空间       出现这样的错误的原因后:     做如下检查:           1: 把struts.xml中的namespace="/"改成namespace=""或者去除,使用默认的命名空间. 2: