Struts and Spring together?
问题 I am pretty new to both Struts and Spring. I need to know how to access a Spring Service in a Struts ActionForm. Even a pointer in the right direction would be appreciated. 回答1: From a struts 1 ActionForm class you'll be needing: WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext).getBean("yourService"); 回答2: Are you using Struts 1 or 2? If you're using Struts 1 then there are couple of ways of doing it. I prefer to do it using org.springframework.web.struts