2013/12/4 Steven Yang <kenshin...@gmail.com>: > 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 dependencies. Regards -- Ćukasz + 48 606 323 122 http://www.lenart.org.pl/ --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org