Posts

Showing posts with the label struts.objectFactory

Struts2 Spring Integration and Accessing ApplicationContext

Struts2 Spring Integration   To enable Spring integration, simply include struts2-spring-plugin-x-x-x. jar in your application.   If you are using more than one object factory, (for example, by including both the Spring and Plexus plugins in your application,) you will need to set the struts.objectFactory property in  struts.properties  or in one of several XML files via  Constant Configuration : struts.properties struts.objectFactory = spring struts.xml <struts>  <constant name="struts.objectFactory" value="spring" />  ... </struts> Configure the Spring listener  - web.xml <listener>    <listener-class>org. springframework.web.context. ContextLoaderListener</ listener-class> </listener> More applicationContext configuration files needed? Since the Spring integration uses a standard Listener, it can be configured to support configuration files other than applicationContext.xml. Add...