当前位置: 代码迷 >> Java Web开发 >> 404异常有关问题
  详细解决方案

404异常有关问题

热度:4546   发布时间:2016-04-11 00:10:13.0
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的申明删掉重敲一遍
  相关解决方案