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一下.