404错误: Could not find action or result
一个很怪的问题。
控制台异常: [org.apache.struts2.dispatcher.Dispatcher]-[WARN] Could not find action or result
There is no Action mapped for namespace /jsp/schedule and action name addMynoteAction. - [unknown location]
这是struts.xml文件Action的配置:
<!-- 查询我的便签列表 --> <action name="findMynoteListAction" class="mynoteAction" method="findMynoteList"> <result name="success" >/jsp/schedule/myNoteList.jsp</result> </action> <!-- 添加便签【只有这个Action找不到】 --> <action [color=#FF6600]name="addMynoteAction"[/color] class="mynoteAction" method="addMynote"> <result type="redirectAction">findMynoteListAction</result> <result name="input">/jsp/schedule/myNoteAdd.jsp</result> </action> <!-- 删除便签 --> <action name="deleteMynoteAction" class="mynoteAction" method="deleteMynote"> <result type="redirectAction" >findMynoteListAction</result> </action> <!-- 根据ID查询便签 --> <action name="findMynoteByIdAction" class="mynoteAction" method="findMynoteById"> <result name="success" >/jsp/schedule/myNoteUpdate.jsp</result> <result name="error" type="redirectAction">findMynoteListAction</result> </action> <!-- 更新便签 --> <action name="updateMynoteAction" class="mynoteAction" method="updateMynote"> <result name="success" type="redirectAction">findMynoteListAction</result> <result name="input" type="redirectAction" >findMynoteByIdAction</result> </action>