ApplicationContext ac1 = WebApplicationContextUtils.getRequiredWebApplicationContext(ServletActionContext.getServletContext()); TopicAction result = (TopicAction)ac1.getBean("TopicAction");