1.导包
2.配置web.xml
3.配置struts-config.xml
4.配置hibernate.cfg.xml
hibernate使用了连接池,故还有个配置文件:ProxoolConf.xml
5.配置spring的配置文件:applicationContext.xml
6.spring和struts整合
6.1 在struts.config.xml文件里 添加插件
<plug-in
className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation" value="classpath:applicationContext.xml" />
</plug-in>
6.2 在web.xml里添加监听器
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>