Hi,
I am developing a
Struts application with two properties file(ApplicationResources.properties and ErrorMessages.properties). Now I am validating form data through ActionForm's validate method as:
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if(id == null || id == "" || id.length() == 0) {
errors.add("userid", new ActionError("login.userid.error"));
}
if(password == null || password == "" || password.length() == 0) {
errors.add("password", new ActionError("login.password.error"));
}
return errors;
}
If there is only one properties file i.e ApplicationResources.properties; the application is working fine. But if I distribute the key-value pairs in two files, it gives an exception.
How can I solve this problem?
Thanks,
Ruchi