在 Apache Struts 1.3.10 中找不到操作错误 class

Cann't find ActionError class in Apache Struts 1.3.10

我按照书 JakataStruts live (2004) 中的教程进行操作。我有代码片段:

@Override
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
ActionErrors errors = new ActionErrors();

if(firstName == null || firstName.trim().equals("")){
    errors.add("firstName", new ActionError("userRegistration.firstName.problem"));
}
//...
return errors;


Netbeans IDE 注意到:"Cannot find symbol"。如何解决以上问题?

Class ActionError 已弃用。使用 ActionMessage class:

errors.add("firstName", new ActionMessage("userRegistration.firstName.problem"));