/**
* Add an error message to the set of errors for the specified property.
*
* @param property Property name (or ActionErrors.GLOBAL_ERROR)
* @param error The error message to be added
* @deprecated Use add(String, ActionMessage) instead. This will be
* removed after Struts 1.2.
*/
errors.add("username",new ActionError("error.login.NullUserName")); --〉
errors.add("username",new ActionMessage("error.login.NullUserName"));
* Add an error message to the set of errors for the specified property.
*
* @param property Property name (or ActionErrors.GLOBAL_ERROR)
* @param error The error message to be added
* @deprecated Use add(String, ActionMessage) instead. This will be
* removed after Struts 1.2.
*/
errors.add("username",new ActionError("error.login.NullUserName")); --〉
errors.add("username",new ActionMessage("error.login.NullUserName"));
啊
因为在1.2
中ActionErrors 已经被捕推荐使用了
用ActionMessages你的errors是不是一个ActionErrors 的 对象
顺便问一下, ActionError与ActionMessage有什么不同之处么?
在一个我从官网下的框架是Struts1.2,但myeclipse4.0只能识别为Struts1.1,这又是怎么一回事呢???
抱歉!!!