There is no Action mapped for namespace[/] and action name [] associated with context path.
来源:互联网 发布:json查看工具 编辑:程序博客网 时间:2024/06/05 16:40
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>,配置文件中需要配置自己项目的启动文件。
暂时就是这六种吧,可能还有别的原因,但是暂时还没遇到。这六种原因排查,应该就能解决了。我当初错就错在包名重复上了,两个配置文件里面起了同一个包名,检查了很久才检查到的。
- There is no Action mapped for namespace [/] and action name [hello] associated with context path [/
- There is no Action mapped for namespace [] and action name [] associated with context path []
- There is no Action mapped for namespace [/] and action name [upload/] associated with context path
- There is no Action mapped for namespace [/] and action name [Login] associated with context path [/e
- There is no Action mapped for namespace [/] and action name [] associated with context path [/struts
- There is no Action mapped for namespace [/] and action name [login] associated with context path [/M
- There is no Action mapped for namespace [/] and action name [] associated with context path [/dxm__s
- There is no Action mapped for namespace [/] and action name [hello2] associated with context path [/
- There is no Action mapped for namespace [/] and action name [user!add] associated with context path
- There is no Action mapped for namespace [/] and action name [Person] associated with context path
- There is no Action mapped for namespace[/] and action name [] associated with context path.
- There is no Action mapped for namespace [/] and action name [login] associated with context path [/p
- There is no Action mapped for namespace [/] and action name [hello] associated with context path [/d
- There is no Action mapped for namespace [/] and action name [] associated with context path [/test1]
- There is no Action mapped for namespace[/] and action name [] associated with context path.
- There is no Action mapped for namespace [/] and action name [Login] associated with context path [/e
- There is no Action mapped for namespace[/] and action name [] associated with context path.问题解决
- There is no Action mapped for namespace [/] and action name [viewLogAction] associated with context
- C++设计模式浅识解释器模式
- WebService三大基本元素 SOAP WSDL UDDI
- Rolling Variance
- java关键字、标识符
- 为什么百度云可以给每位用户分配两T的存储空间?
- There is no Action mapped for namespace[/] and action name [] associated with context path.
- 常见通信RF指标的内在和意义
- mybatis中使用in查询时的注意事项
- 持久内存的系统软件(System Software for Persistent Memory,Eurosys‘14)
- 软件测试
- Git 的 .gitignore 配置
- 提高工作效率的工具
- C++学习
- 单向循环链表(建表、插入、删除、输出)