struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wes Wannemacher <>
Subject Re: [S2] Accessing objects in the Spring context?
Date Wed, 09 Sep 2009 01:41:07 GMT
On Tuesday 08 September 2009 09:32:19 pm James Carr wrote:
> Couldn't I just make it ApplicationContextAware?
> On Tue, Sep 8, 2009 at 8:27 PM, Musachy Barroso<> wrote:
> > WebApplicationContextUtils.getRequiredWebApplicationContext(ServletAction
> >Context.getServletContext());

You *can* make it ApplicationContextAware, if and only if you are 
instantiating the interceptor via spring. The benefit to Musachy's suggestion 
is that it will work whether it is Spring instantiated or Struts instantiated. 
Not a big difference tho... 

Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat... 
Ask me for a quote!

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

View raw message