struts 使用LookDispatchAction出现错误:MAPPING configuration error for request URI
想要在数据库操作时,在查找得到的表中直接对相应记录删除。
.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多个按钮都是这样做的,也没问题。不知这里是错在哪里。
.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多个按钮都是这样做的,也没问题。不知这里是错在哪里。
...全文
相关推荐
2022年7月职业健康安全管理体系.pdf
2022年7月职业健康安全管理体系
Wheeltec小车的开发实录(2)
为了简化在终端的输入步骤我把需要的命令都做成了.sh文件,代码如下,执行方式是在终端中输入./文件名.sh,读者请根据自己的文件夹和ip修改。sudo apt-get install ros-melodic-gmapping #根据自己的ros版本更改中间的名字我的是melodic。如果电脑连接的时有线网,则显示结果中,etho 部分的 inet addr 后面就是该电脑的 IP 地址;如果电脑连接的是无线,则 wlan0 部分的 inet addr 后就是 IP 地址。2、修改hosts文件内容。
ISO45001-2018(正式)职业健康安全管理体系 要求及使用指南.pdf
新版IS045001标准,中文正式版本,PDF格式,需要的可以下载。
ISO 45001:2018 职业健康安全管理体系(TUV中文参考翻译版).pdf
ISO 45001:2018 职业健康安全管理体系(TUV中文参考翻译版). 国家标准委的正式中文翻译版(国标)预计在2019年年底发布。 此中文版是TUV的培训资料,可作参考。
2020年新版ISO45001职业健康安全管理体系全套程序文件汇编.pdf
2020年新版ISO45001职业健康安全管理体系全套程序文件汇编.pdf


Web 开发
