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

    There is no Action mapped for namespace[/] and action name [] associated with context path.这是一个很常见的struts问题,意思就是在当前的路径下找不到Action。这种问题说好解决也挺好解决,说不好解决有时候就得找好长时间。不过说到底,肯定是配置文件的问题,下面就简单写几种解决方式。

 

    1、首先检查Action名称是否写错,如果是名称错了,那么没办法,出这种错浪费时间也是应该的。

 

    2、检查配置文件是否写错,struts有一个默认的配置文件,叫struts-default.xml,这个配置文件名字是不能错的,这个是规定。但是光这一个配置文件名字不错,可能还会有问题。一般大一点的项目,配置文件有好多,可能会一个模块一个配置文件,但是一个项目中只有一个struts-default.xml,所以基本上都是把struts的配置写在各个模块的配置文件中,然后把在struts-default.xml中引用这些配置文件。所以说,其他配置文件一定要在struts-default.xml中引用,而且名字不能出错。

 

    3、配置文件中的包名不能重复,尤其是采用多个struts配置文件时,各个文件之间的package的name一定不能重复。

 

    4、检查struts-default.xml配置文件所在路径,一般都在src能找到的路径下,而且要确认编译后是否在classes目录下。

 

    5、可以去掉namespace试试,namespace是action的目录,如果action指定目录的话,就在指定namespace下找,没有的话,就在默认的路径下找。

 

    6、检查struts配置文件中有没有配置<welcome-file>,配置文件中需要配置自己项目的启动文件。

 

    暂时就是这六种吧,可能还有别的原因,但是暂时还没遇到。这六种原因排查,应该就能解决了。我当初错就错在包名重复上了,两个配置文件里面起了同一个包名,检查了很久才检查到的。

  • 5
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 19
    评论
Learn and use Python and PyGame to design and build cool arcade games. In Program Arcade Games: With Python and PyGame, Second Edition, Dr. Paul Vincent Craven teaches you how to create fun and simple quiz games; integrate and start using graphics; animate graphics; integrate and use game controllers; add sound and bit-mapped graphics; and build grid-based games. After reading and using this book, you'll be able to learn to program and build simple arcade game applications using one of today's most popular programming languages, Python. You can even deploy onto Steam and other Linux-based game systems as well as Android, one of today's most popular mobile and tablet platforms. You'll learn: How to create quiz games How to integrate and start using graphics How to animate graphics How to integrate and use game controllers How to add sound and bit-mapped graphics How to build grid-based games Audience This book assumes no prior programming knowledge. Table of Contents Chapter 1: Before Getting Started… Chapter 2: Create a Custom Calculator Chapter 3: What Is a Computer Language? Chapter 4: Quiz Games and If Statements Chapter 5: Guessing Games with Random Numbers and Loops Chapter 6: Introduction to Graphics Chapter 7: Back to Looping Chapter 8: Introduction to Lists Chapter 9: Introduction to Animation Chapter 10: Functions Chapter 11: Controllers and Graphics Chapter 12: Bitmapped Graphics and Sound Chapter 13: Introduction to Classes Chapter 14: Introduction to Sprites Chapter 15: Libraries and Modules Chapter 16: Searching Chapter 17: Array-Backed Grids Chapter 18: Sorting Chapter 19: Exceptions Chapter 20: Recursion Chapter 21: Formatting Chapter 22: Exercises

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 19
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值