struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <>
Subject Re: S2 - custom tag with Spring
Date Thu, 05 Dec 2013 08:29:32 GMT
2013/12/4 Steven Yang <>:
> I think I missed something.
> To be clear what I meant by tag as jsp tag with tld defined.
> Yes my resource beans are defined in Spring, using XML actually. However my
> tag classes are not.
> From what I understand, the life cycle of tag is controlled by the web
> container therefore not defined in Spring.
> However I know that Struts tags do get intervened by Struts during the life
> cycle that's why using the Struts @Inject works.
> But when Struts inject its own resource, does it/will it inject resource
> defined in Spring?
> Or did I miss something?

Tag (or rather Tag's Model) isn't created via ObjectFactory but
directly with new keyword and then internal (Struts) dependencies are
injected into it. So basically you can annotate your tag with
@Inject(ObjectFactory) and then use the factory to resolve external

+ 48 606 323 122

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

View raw message