struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Burgess <>
Subject Re: Spring bean access from custom validation
Date Tue, 03 Jun 2008 15:39:30 GMT
If Spring works with validators the way it does with interceptors and
actions, which I assume it does, then one way you could do this is to define
your validator as a spring bean:

<validator name="aSpringValidator" class="springValidator"/>


springValidator would be the id of your spring managed bean. Then you would
inject any dependencies into that spring bean using normal methods,
depending on the version of spring you are using, i.e. XML or annotations.

I've had issues with auto-wiring on WebLogic so I do things this way.

Randy Burgess
Sr. Web Applications Developer
Nuvox Communications

> From: Alec C4 <>
> Reply-To: Struts Users Mailing List <>
> Date: Tue, 3 Jun 2008 06:48:19 -0700 (PDT)
> To: <>
> Subject: Spring bean access from custom validation
> Hi, 
> i'm trying to understand - how to access some spring bean from my custom
> validation. Could you please explain me - how to do it?
> -- 
> View this message in context:
> 23952.html
> Sent from the Struts - User mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

This email and any attachments ("Message") may contain legally privileged and/or confidential
information.  If you are not the addressee, or if this Message has been addressed to you in
error, you are not authorized to read, copy, or distribute it, and we ask that you please
delete it (including all copies) and notify the sender by return email.  Delivery of this
Message to any person other than the intended recipient(s) shall not be deemed a waiver of
confidentiality and/or a privilege.

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

View raw message