当我尝试使用弹簧验证时,错误消息不会显示。你能帮忙吗?
我的jsp:
time
我的验证员:
<xsl:copy-of select="/" copy-namespaces="no"/>
}
我的控制器:
<form:form method="POST" modelAttribute="userInfo">
<form:label path="redirectURL">Hybris URL</form:label>:
<form:input path="redirectURL" placeholder="请填写Hybris管理平台地址" />
<form:errors path="redirectURL" class="error" /><br />
<form:label path="email" >Last Name</form:label>:
<form:input path="email" placeholder="请填写邮箱地址" />
<form:errors path="email" class="error" /><br/>
<form:input type="hidden" path="taobaoUserId" value= "${taobaouserid}" />
<input type="submit" class="button" value="提交" style="margin-right: 15px;" />
当我调试时,我可以在控制器的“结果”中看到与错误相关的信息。但是,消息未显示在前端。我想有一些问题。任何人都可以帮忙吗?
答案 0 :(得分:0)
发生错误时,您无需重新分配命令对象BigInt
。您只需要返回您的视图。
使用新userInfo
替换userInfo
您正在清除错误信息。
试试这个:
UserInfo