struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RogerV <>
Subject Re: Struts 2 Conditional Validators?
Date Thu, 16 Dec 2010 12:24:46 GMT

Dave Newton-6 wrote:
> Validators aren't called when *you* call a method, its not like they
> cause byte-code to be inserted.
> Dave

Ok - bad choice of words. Validation annotations are processed by the
AnnotationValidationInterceptor. How it decides what to process I find a bit
hazy. There is super class ValidationInterceptor call made
actionValidatorManager.validate(action, context, method); 
which I assumed meant that the interceptor was looking to process only those
annotations on the method being called, rather than looking for all the
annotations in the class and applying them in turn (which is what the
VistorValidator seems to do unfortunately). I kind lost it at this point as
Struts found and executed my annotations although they were on methods
called by execute() rather than being placed on execute() itself.


View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message