SSH form submit: HTTP Status 404 - No result defined for action

HTTP Status 404 - No result defined for action com.property.action.BaseStationAction and result input

这是我在做修改时报的错

表单如果是直接跳转过来,我点添加过来再提交是没有错的。但如果是修改就报这样的错。

总算找出来了:

这是struts2的一个拦截器报的错误,当你的form中的数据有问题,比如说
<input type="text" name="receiverLoginID" value="<%=name%>"/>
当 name值为NULL时,

<input style="float: left;" name="been.area" id="been.area" value="${been.area}" maxlength="20"/>

而在页面我给的值是0.0或是0时

也就出这个错了,所以可以我在当前页面加入以下标签

struts.xml 文件中加了一个配置

<result name="input">/property/baseStation/error.jsp</result>

然后在error.jsp中加如下

<%@ taglib prefix="s" uri="/struts-tags"%>
<div style="color:red">
    <s:fielderror />
</div>
它就会显示拦截器的错误信息了

猜你喜欢

转载自blog.csdn.net/jiayu8706/article/details/5934963