[opencms-dev] How to get Spring's ApplicationContext in A_CmsModuleAction?

Edwin Chiu edwin.chiu at gmail.com
Wed Mar 10 06:54:04 CET 2010


Hi All,

I've a ModuleAction class that extends A_CmsModuleAction. When users publish
resources in opencms, I want to get Spring's ApplicationContext in overrided
method - publishProject(). And then get the service bean from
ApplicationContext to do something.

I can get the ApplicationContext in OpenCms jsp by below.
ApplicationContext appContext =
WebApplicationContextUtils.getWebApplicationContext(request.getSession().getServletContext());

So, do you guys know how to get the ServletContext from A_CmsModuleAction?

Thanks for advice.

Regards,
Edwin

-- 
View this message in context: http://old.nabble.com/How-to-get-Spring%27s-ApplicationContext-in-A_CmsModuleAction--tp27845881p27845881.html
Sent from the OpenCMS - Dev mailing list archive at Nabble.com.




More information about the opencms-dev mailing list