username={0}
password={0}
theusernameorpasswordwaserror={0}
thenameisexist={0}
上面是资源文件里的内容
下面是action里的代码:
messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("thenameisexist", "ssss"));
saveMessages(request, messages);
下面是jsp里的代码:
<html:messages id="messages" message="true">
<bean:write name="messages"/>
<html:messages>
ActionErrors 在struts1.2中建议不适用,用ActionMessage代替,在struts1.3中ActionErrors完全被抛弃了。
ActionErrors是ActionMessage的子类。
password={0}
theusernameorpasswordwaserror={0}
thenameisexist={0}
上面是资源文件里的内容
下面是action里的代码:
messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("thenameisexist", "ssss"));
saveMessages(request, messages);
下面是jsp里的代码:
<html:messages id="messages" message="true">
<bean:write name="messages"/>
<html:messages>
ActionErrors 在struts1.2中建议不适用,用ActionMessage代替,在struts1.3中ActionErrors完全被抛弃了。
ActionErrors是ActionMessage的子类。