ActionErrors errors, int page) {
ValidatorResources resources = Resources.getValidatorResources(application,request);
Locale locale = Resources.getLocale(request);
Validator validator = new Validator(resources, key);
validator.setUseContextClassLoader(true);
validator.setPage(page);
validator.addResource(SERVLET_CONTEXT_KEY, application);
validator.addResource(HTTP_SERVLET_REQUEST_KEY, request);
validator.addResource(Validator.LOCALE_KEY, locale);
validator.addResource(ACTION_ERRORS_KEY, errors);
validator.addResource(Validator.BEAN_KEY, bean);
return validator;
}