2, Webwork2 and SpringFramework integration configuration
(1) WW2 / Web-INF / ApplicationContext.xml
l Since the web representation is implemented in the use of Spring MVC Framework, the BEAN configuration of the business logic layer and the data persistence component is moved from SpringApp-servlet.xml to ApplicationContext.xml.
XML Version = "1.0" encoding = "UTF-8"?>
"http://www.springframework.org/dtd/spring-beans.dtd">
Property>
bean>
Property>
bean>
Property>
bean>
beans>
(2) WW2 / Web-INF / Web.xml
l Add 2 context listeners in web.xml
listener>
(3) WW2 / Web-INF / CLASSES / XWORK.XML
ExternalReferenceRereSolver = "com.atlassian.xwork.ext.springservletContextReferenceRereSolver"> Class = "com.opensymphony.xwork.interceptor.externalReference" /> interceptor-stack> interceptor-stack> interceptors> Class = "Web.SPRINGAPPACTION"> / web-inf / template / hello.vm param> result>
/ web-inf / jsp / hello.jsp param> result> -> action> Class = "Web.PriceIncReaseform"> / web-inf / template / priceIncrease.vm param> result>
/ web-inf / jsp / priceIncrease.jsp param> result> -> action> Class = "Web.PriceInCreaseformAction"> / web-inf / template / priceIncrease.vm param> result>
/ web-inf / jsp / priceIncrease.jsp param> result> -> SpringApp param> result> action> package> xwork> l Xwork uses external references to use references in the Spring Bean configuration: l Specify the external reference parser in the Interceptor l recombined stack to encompass com.opensymphony.xwork.interceptor.ExternalReferencesInterceptor; Interceptor herein defined two stacks: externalStack and externalValidationWorkflowStack, the former is defined as a default reference Interceptor, the latter being required to verify the validity of the data reference Action L Finally, use the