Configuration in 1.web.xml
STRUTS2 Filter <filter><filter-name>struts2</filter-name><filter-class> org.apache.struts2.dispatcher.ng.filter.strutsprepareandexecutefilter</filter-class></filter>< filter-mapping><filter-name>struts2</filter-name><url-pattern>/*</url-pattern>< Filter-mapping> Add Spring Context configuration <context-param><param-name>contextConfigLocation</param-name> <param-value>classpath:applicationContext.xml</param-value><context-param> Add Listener <listener ><listener-class>org.springframework.web.context.contextloaderlistener</listerner-class></ Listener>
Configuration in 2.applicationcontext.xml
The data source configuration in the applicationcontext.xml can be replaced with a different data source <bean id= "DataSource" class= " Org.apache.commons.dbcp.BasicDataSource "> Property-driven <property name=" Driverclassname "value=" Oracle.jdbc.driver.OracleDriver "/> Connection url<property name=" url "value=" Jdbc:oracle:thin: @localhost: 1521:ORCL "/ > User name <property name= "username" value= "ACCP"/> password <property name= "password" value= "ACCP"/></bean> Configure Sessionfactory<bean id= "Sessionfactory" class= "Org.springframework.orm.hibernate3.LocalSessionFactoryBean" > Associated data source <property name= "DataSource" ref= "DataSource"/> Configure hibernate properties <property name= "Hibernateproperties "><props> the dialect that connects the database depends on different data and version <prop key=" Hibernate.dialect "> org.hibernate.dialect.oracle9dialect</prop></props></property> mapping File configuration <property name= " Mappingresources "><list><value> implements the Hibernate configuration file path/class name for the class. hbm.cfg</value><value></ Value></list></property></bean>
Configuration in 3.struts.xml
After configuring Struts's action in Applicationcontext.xml
The class of action in Struts.xml to write the ID of the action that configures struts in Applicationcontext.xml
SSH Integration Summary A