// instantiate the validator, and set configured parameters
//todo - can this use the ThreadLocal?
validator = objectFactory.buildValidator(className, cfg.getParams(), ActionContext.getContext().getContextMap());
} catch (Exception e) {
final String msg = "There was a problem creating a Validator of type " + className + " : caused by " + e.getMessage();
throw new XWorkException(msg, e, cfg);
}
// set other configured properties
validator.setMessageKey(cfg.getMessageKey());
validator.setDefaultMessage(cfg.getDefaultMessage());