RE: Is there a way to use Spring to inject objects to a Struts 2 Interceptor?

2008-01-07 Thread Néstor Boscán
Ted it looks like Struts 2 does use the object factory for the Interceptor.
I already wired the Interceptor with Spring.

Thanks Alot!! 

-Mensaje original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Ted
Husted
Enviado el: Lunes, 07 de Enero de 2008 12:46 p.m.
Para: Néstor Boscán
Asunto: Re: Is there a way to use Spring to inject objects to a Struts 2
Interceptor?

The Struts2 Spring plugin takes care of that for the Actions. I just don't
know if the object factory is also used with Intecepter properties.

 * http://struts.apache.org/2.x/docs/spring-plugin.html

If it doesn't, depending on the use case, an alternative might be to inject
the properties into the Action, and then have the Interceptor use the Action
property.

HTH, Ted
 * <http://www.StrutsMentor.com/>


On Jan 7, 2008 11:22 AM, Néstor Boscán <[EMAIL PROTECTED]> wrote:
> No I haven't tried that because how Struts knows that the interceptor 
> that I'm defining is instantiated by Spring and not by Struts 2?
>
> -Mensaje original-
> De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de 
> Ted Husted Enviado el: Lunes, 07 de Enero de 2008 09:24 a.m.
> Para: Struts Users Mailing List
> CC: [EMAIL PROTECTED]
> Asunto: Re: Is there a way to use Spring to inject objects to a Struts 
> 2
>
> Interceptor?
>
> Hmmm, it's an interesting idea.
>
> I take it you already tried defining a property in the Interceptor, 
> the same way we would for an Action, and a Spring bean was not 
> injected into the Interceptor property? (I never tried it myself.)
>
> -- HTH, Ted
>  * <http://www.StrutsMentor.com/>
>
> On Jan 4, 2008 4:51 PM, Néstor Boscán <[EMAIL PROTECTED]> wrote:
> > Hi
> >
> > Is there a way to use Spring to inject objects to a Struts 2
Interceptor?
> >
> > Regards,
> >
> > Néstor Boscán
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is there a way to use Spring to inject objects to a Struts 2 Interceptor?

2008-01-07 Thread Ted Husted
Hmmm, it's an interesting idea.

I take it you already tried defining a property in the Interceptor,
the same way we would for an Action, and a Spring bean was not
injected into the Interceptor property? (I never tried it myself.)

-- HTH, Ted
 * <http://www.StrutsMentor.com/>

On Jan 4, 2008 4:51 PM, Néstor Boscán <[EMAIL PROTECTED]> wrote:
> Hi
>
> Is there a way to use Spring to inject objects to a Struts 2 Interceptor?
>
> Regards,
>
> Néstor Boscán

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Is there a way to use Spring to inject objects to a Struts 2 Interceptor?

2008-01-04 Thread Néstor Boscán
Hi
 
Is there a way to use Spring to inject objects to a Struts 2 Interceptor?
 
Regards,
 
Néstor Boscán


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]