saveMessages和saveErrors

07-04-23 hwangita
主要代码:

errors.add(ActionMessages.GLOBAL_MESSAGE,new ActionMessage("error.username.existed"));

if (!errors.isEmpty()) {

saveErrors(request, errors);

//saveMessages(request,errors);

}

pageForward = "ToErrorPage";

用saveErrors()在<html:errors/>可以显示错误,

saveMessages()却不行,

能讲讲它们的却别吗?

还有addMessages(),addErrors()吧,顺便讲讲最好了!

banq
2007-05-08 11:20
这是struts 1.1和struts 1.2以后版本区别.

猜你喜欢