ssi整合action采用注解方式,运行报错:There is no Action mapped for namespace [/]

来源:互联网 发布:比较正规贷款软件 编辑:程序博客网 时间:2024/04/27 19:23

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

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

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

==========================

类似这样的错误,是因为如果action使用注解方式,则action类所在包名必须 包含 strutsstruts2action or actions

 

struts2原文:

 First the Convention plugin finds packages named strutsstruts2action or actions. Any packages that match those names are considered the root packages for the Convention plugin. Next, the plugin looks at all of the classes in those packages as well as sub-packages and determines if the classes implementcom.opensymphony.xwork2.Action or if their name ends with Action (i.e. FooAction).


 

原创粉丝点击