日期:2014-05-18  浏览次数:20694 次

<html:errors>问题
jsp代码:
<table   border= "1 ">
<tr>
<td   colspan= "2 "> <html:errors   /> </td>
</tr>
</table>

Form
public   ActionErrors   validate(ActionMapping   mapping,
HttpServletRequest   request){
ActionErrors   errors=new   ActionErrors();
if(username==null){
errors.add(ActionMessages.GLOBAL_MESSAGE,new   ActionMessage( "hello.login.notype "));
}
return   errors;
}

当点击触发action.do的时候 <html:errors> 怎么也显示不出来,为什么?请高人指点!

------解决方案--------------------
<html:errors property= "ActionMessages.GLOBAL_MESSAGE对应的值 " />
------解决方案--------------------
save一下.