ActionErrors errors = new ActionErrors();
if (username == null || "".equals(username)) {
errors.add("username", new ActionError("errors.required","The username"));
}
if (password == null || "".equals(password)) {
errors.add("password", new ActionError("errors.required","The password"));
}
return errors;