Hi Dave, Thanks for your reply. I tried setting the scope of the action bean to prototype (amoung 100 other things) but it didn't change the behaviour. I'm using Struts2 with Sping plugin, jdk1.8.0_51. If it wasn't calling the setter that would make more sense, but sine it is calling the setter that makes me beleive he autowiring is working, I just can't understand why its later being set to null. I thought it might be a scope issue but I don't know enough about struts to dig much deeper. Thanks Chris -----Original Message----- From: Dave Newton [mailto:davelnew...@gmail.com] Sent: Saturday, September 5, 2015 11:27 PM To: Struts Users Mailing List Subject: Re: Spring Injection Strange behaviour Not sure, but if nothing else the action should be set to `prototype` scope, as they're instantiated per-request. Are you using the Struts 2 Spring plugin? On Sat, Sep 5, 2015 at 8:47 AM, Chris <crisp...@gmx.us[mailto:crisp...@gmx.us]> wrote: > I'm trying to use the Spring plugin to inject a dependency into my > action at runtime. This is the first time I've tried this with Struts2 > so I may have missed something but I'm stumped because I can see the > dependency is injected but then the object is later null when I need > to use it. Here is my action class code: > > public class UserRegisterAction extends ActionSupport { > private User user = new User(); >
--------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org