struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Burgess <RBurg...@nuvox.com>
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:

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

</validators>

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.

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



> From: Alec C4 <alec.c4@gmail.com>
> Reply-To: Struts Users Mailing List <user@struts.apache.org>
> Date: Tue, 3 Jun 2008 06:48:19 -0700 (PDT)
> To: <user@struts.apache.org>
> 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:
> http://www.nabble.com/Spring-bean-access-from-custom-validation-tp17623952p176
> 23952.html
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 



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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message