struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zarar Siddiqi <zar...@gmail.com>
Subject Re: [S2] + Spring - WebApplicationContext?
Date Sun, 24 Jun 2007 19:02:30 GMT

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 <paul.saumets@merge-solutions.com> 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: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message