THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- Place your Spring xml files under
/META-INF/spring
in the bundle jar file - Copy all the bundle jar files into
/WEB-INF/classes/bundles
in your application - Make sure that the following properties are set (with the listed values) or not set at all in struts.xml or struts.properties in your application:
Code Block XML XML <constant name="struts.objectFactory" value="osgi" /> <constant name="struts.objectFactory.delegate" value="spring" /> <constant name="struts.freemarker.manager.classname" value="org.apache.struts2.osgi.BundleFreemarkerManager" />
- Install the Struts 2 Spring plugin in your application
- Add
to web.xml and an empty applicationContext.xml:Code Block XML XML <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener>
underCode Block XML XML <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans></beans>
/WEB-INF/
in your application. This is a hack, but the Spring support doesn't work otherwise. TODO: find a way around this dirty hack - If you are going to use Velocity results, then add Velocity and Common Digester jars to your application. Using maven:
...