I follow the tutorial in book JakataStruts live
(2004). I have code snippet:
@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 notice that: "Cannot find symbol". How to resolve the above problem?
Class ActionError
is deprecated. Use ActionMessage
class:
errors.add("firstName", new ActionMessage("userRegistration.firstName.problem"));