struts 使用LookDispatchAction出现错误:MAPPING configuration error for request URI

hawkswoods hawkswoods 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
想要在数据库操作时,在查找得到的表中直接对相应记录删除。
.jsp是这样实现的
<table align=center border="15" cellspacing="2" width="89%"> <br>
<tr>
<th>用户名 </th><th>角色</th><th>删除</th>
</tr>
<logic:iterate id="rs" name="queryResult">
<tr>
<form action="/searchAction.do?expression=<bean:write name='rs' property='username' />">
<td><bean:write name="rs" property="username" /></td>
<td><bean:write name="rs" property="role" /></td>
<td>
<html:submit property="method">
<bean:message key="button.remove"/>
</html:submit>
</td>
</form >
</tr>
</logic:iterate>
</table>

Action.java中是这样实现的:

public class searchAction extends LookupDispatchAction{

protected Map getKeyMethodMap() {
Map map = new HashMap();
map.put("button.find", "find");
map.put("button.show_all", "show_all");
map.put("button.remove", "remove");
return map;
}

public ActionForward show_all...;
public ActionForward find...;
public ActionForward remove...;
}

资源文件ApplicationResources.properties中这样改的:
button.find=find
button.show_all=show_all
button.remove=remove

出现错误提示:MAPPING configuration error for request URI 和No Context configured to process this request


我以前用LookupDispatchAction实现一个form多个按钮都是这样做的,也没问题。不知这里是错在哪里。

...全文

相关推荐

评论 7
收藏 已收藏
分享
返回顶部
hawkswoods
Web 开发 81,107 成员 341,720 内容