On Wed, Aug 6, 2008 at 3:33 AM, Martin Homik <[EMAIL PROTECTED]> wrote: > > Injection of beans outside Spring does not work, that's clear. But I was > surprised to learn that it is not possible to inject beans in *ManagerImpl > and *Action classes. Am I completely wrong?
Yes, you are wrong. ;-) This should work. > > In my app, I have a competency action class which is in charge of putting a > competency's names on the valueStack. The retrieval is done via a > NameManager instead of a CompetencyManager. However, while it is possible to > inject the CompetencyManager in CompetencyAction, the NameManager is not set > all. I've checked my Name* classes and everything seems to be fine. Also, my > applicationContext.properties looks correct. All NameDao tests and > NameManager tests go through, but the CompetencyAction tests throw a > NullPointerException as the nameManager has not been set/injected. Do you have a setNameManager method and is your Action in the packageName specified in web.xml for Zero Configuration? http://struts.apache.org/2.0.9/docs/zero-configuration.html Matt > > Any hints? > > Is my problem actually related to this post: > http://www.nabble.com/forum/ViewPost.jtp?post=18846526&framed=y&skin=2369 > Null Spring beans ? > > > -- > View this message in context: > http://www.nabble.com/No-injection-of-beans-into-Manager-Action-classes--tp18847481s2369p18847481.html > Sent from the AppFuse - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]