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文件布置 》

   



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

  1. Struts2中关于"There is no Action mapped for namespace / and action name"的总结

    今天在调试一个基础的Struts2框架小程序.总是提示"There is no Action mapped for namespace / and action name"的错误. ...

  2. 报错: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 no ...

  3. 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 ...

  4. There is no Action mapped for namespace / and action name UserAction

    果断收藏了,说的非常具体.刚開始学习的人常常遇到的问题. There is no Action mapped for namespace / and action name UserAction 在网 ...

  5. eclipse中配置struts2出现There is no Action mapped for namespace [/] and action name [Login] associated wi

    下午在eclipse中配置struts2时报: There is no Action mapped for namespace [/] and action name [Login] associat ...

  6. struts 2.5 There is no Action mapped for namespace [/] and action name [user_find] associated with context path [/struts2_crm].

    遇到了这个错误. There is no Action mapped for namespace [/] and action name [user_find] associated with con ...

  7. struts2方法无法映射问题:There is no Action mapped for namespace [/] and action name [m_hi] associated with context path []

    使用struts的都知道,下面使用通配符定义的方式很常见,并且使用也很方便: <action name="Crud_*" class="example.Crud&q ...

  8. struts2中错误There is no Action mapped for namespace [/] and action name [] associated with context path

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

  9. Struts2-tomcat报错:There is no Action mapped for namespace / and action

    HTTP Status 404 - There is no Action mapped for namespace / and action name first. type Status repor ...

随机推荐

  1. 休假结束,Linus重回内核开发岗位

    在休假反省一个多月之后,Linus Torvalds 又回来了.10 月 22 日爱丁堡举行的欧洲开源峰会上,Linus Torvalds 将与内核维护者们碰头,这是他重新接管Linux内核开发的第一 ...

  2. modelForm所遇问题

    1. 通过modelForm创建表单所遇问题 id 在modelForm中无法创建使用 因为它是django的设置,自增的字段,而不是模型中所设置的字段. 当关联外键时,创建多选的下拉框时,需要注意此 ...

  3. [Python] Manage Dependencies with Python Virtual Environments

    Virtual Environments ensure that dependencies from one Python application don’t overwrite the depend ...

  4. php实现简单算法3

    php实现简单算法3 这篇文章主要介绍了PHP经典算法集锦,整理了各种常见的算法,包括排序.查找.遍历.运算等各种常见算法原理与实现技巧,需要的朋友可以参考下 1.首先来画个菱形玩玩,很多人学C时在书 ...

  5. es8 --- 新特性

    ES8尚未发布(2017年1月),下面是它已经完成起草的一些特性: Object.values() Object.entries() padStart() padEnd() Object.getOwn ...

  6. Linux下使用网上银行

    Linux下使用网上银行 650) this.width=650;" onclick="window.open("http://blog.51cto.com/viewpi ...

  7. 如何优雅的写UI——(3)添加MFC选项卡

    窗体创建完成,接下来我们讲讲控件的使用 首先在CFormView窗体下选项卡的成员变量,这里我选择MFC下的选项卡类库:CMFCTabCtrl class CtabView : public CFor ...

  8. 【hoj】2160 bin packing 二分、贪心

    这个题是在二分的题单上的,可是依据二分法写出来的会在oj上超时.依据题目以下给出的提示能够发现能通过贪心法每次都找最能满足的情况去填充每个包,这样就能保证使用的包的数量是最少的 二分法解法: #inc ...

  9. 码农的救赎:使用Github Pages搭建博客

    人生若仅仅如初见,都恨太晚 据说有博客的人比没博客人的薪水要高非常多,相传写博客也是一个高手的标配,尽管之前一直有在写(在这里).可是孤既不是高手.薪水还比别人少.之前一直在CSDN上面写博客,那是一 ...

  10. 重建一些被PHP7废弃的函数,

    <?php if(!function_exists('ereg')) { function ereg($pattern, $subject, &$matches = []) { retu ...