SSH整合
1、添加框架 添加顺序是 Struts Spring hibernate
2、web.xml 添加Spring的监听器
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
3、修改Struts-config.xml添加Spring插件 一定要放在配置文件最后
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation" value="/WEB-INF/bean.xml" />
</plug-in>
4、整合Struts 把所有Action的父类,改为ActionSupport
5、在applicationContext.xml里面, 每一个struts里面的Action都要对应建一个BEAN,
并且Bean不能用ID,要用name name=/MyActionPath
6、修改Struts-config.xml对应的Action 把type修改为 org.springframework.web.struts.DelegatingActionProxy
7、添加Hibernate
8、要删除一个Jar asm-2.2.3.jar MyEclise6.0以上版本
9、添加commons-pool.jar和commons-collections.jar 到/web-inf/lib/下