读书人

html:errors不显示

发布时间: 2014-01-26 14:39:34 作者: rapoo

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

        

读书人网 >Java Exception

热点推荐