日期:2014-05-17  浏览次数:20627 次

404错误问题

我在jsp页面写如下代码报错:
<a href="LoginAction!aa.action">账户信息</a>

但是重新写一个action类又完全正常:
<a href="UserLoginAction!aa.action">账户信息</a>

求解释

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

type Status report

message There is no Action mapped for namespace / and action name LoginAction.

description The requested resource is not available.


web.xml:
<!-- struts配置的拦截 -->
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
java web

------解决方案--------------------
你struts.xml里面没写错?
------解决方案--------------------
不会有个小写的 loginAction 冲突了吧

------解决方案--------------------
或者 全角半角字符 没看出来?

或者 loginAction前有半个看不见的其它字符码,

把整个action的申明删掉重敲一遍