首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

404异常有关问题

2013-09-16 
404错误问题我在jsp页面写如下代码报错:a hrefLoginAction!aa.action账户信息/a但是重新写一个acti

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的申明删掉重敲一遍

热点排行