All,
I'm using struts with spring.
I have a number of beans defined in applicationContext.xml.Code:<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn"> <set-property property="contextConfigLocation" value="/WEB-INF/applicationContext.xml,/WEB-INF/action-servlet.xml" /> </plug-in>
When I try to access these beans using WebApplicationContext, like
i getCode:WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(servlet.getServletContext()); manager = (HierarchyInUseManager) ctx.getBean("hierarchyInUseManager");
Can I access these beans using WebApplicationContext? If not, how do I do it?Code:org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'hierarchyInUseManager' is defined
I understand struts loads it's own context. How can I get access to the struts context?
Any help appreciated.
Thanks.


Reply With Quote