That'll work but if you want to use one line to get it, use this: http://www.springframework.org/docs/api/org/springframework/web/context/support/WebApplicationContextUtils.html#getRequiredWebApplicationContext(javax.servlet.ServletContext) WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext)
Zarar Shibing.Chen wrote: > > Let your Action implements ApplicationContextAware interface. > > On 6/22/07, Paul <[EMAIL PROTECTED]> wrote: >> Probably a dumb question but does anyone have an example of the best way >> of obtaining the web application context within a Struts 2 action? >> >> I need to lookup and get a bean that I've configured in my spring >> context. >> >> Thanks in advance! >> Regards, >> Paul > > > -- > Think different. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/-S2--%2B-Spring---WebApplicationContext--tf3965475.html#a11277442 Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]