You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Benson Margulies <bi...@gmail.com> on 2011/05/04 16:37:33 UTC
Injecting a servlet context into an arbitrary bean
This is probably more a spring question than a CXF question, but ...
using org.springframework.web.context.ContextLoaderListener, I'd like
to get a reference to the servlet context in a bean which is not a
service bean of my jax-rs service. Can I just implement
ServletContextListener, or is there some other spring-trick here?
Re: Injecting a servlet context into an arbitrary bean
Posted by Sergey Beryozkin <sb...@gmail.com>.
Arbitrary beans can probably implement
http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/web/context/ServletContextAware.html
Cheers, Sergey
On Wed, May 4, 2011 at 3:37 PM, Benson Margulies <bi...@gmail.com> wrote:
> This is probably more a spring question than a CXF question, but ...
> using org.springframework.web.context.ContextLoaderListener, I'd like
> to get a reference to the servlet context in a bean which is not a
> service bean of my jax-rs service. Can I just implement
> ServletContextListener, or is there some other spring-trick here?
>