404错误问题

yhm2046 2013-09-15 12:10:24

我在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>
...全文
125 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
末日哥 2013-09-15
  • 打赏
  • 举报
回复
你struts.xml里面没写错?
无聊找乐 2013-09-15
  • 打赏
  • 举报
回复
或者 全角半角字符 没看出来? 或者 loginAction前有半个看不见的其它字符码, 把整个action的申明删掉重敲一遍
无聊找乐 2013-09-15
  • 打赏
  • 举报
回复
不会有个小写的 loginAction 冲突了吧
yhm2046 2013-09-15
  • 打赏
  • 举报
回复
引用 1 楼 fudongrifdr 的回复:
你struts.xml里面没写错?
写对了啊,都一样的,换个action类就没问题,原来的action就报错,找不出原因啊

81,094

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧