SSH三层架构教程(Struts1)
Author:cjp zn
Time:2012-10-01 1、创建web 项目
2、添加struts
3、添加Spring
4、创建数据源
5、添加Hibernate
6、从数据源中的表映射实体类到项目工程
7、在Struts中创建form
8、在Struts中创建action
9、创建JSP页面
创建跳转成功ok.JSP页面
10、server和action中.java类的添加补充
创建server 类(有dao类的set & get 方法及saveUser 方法)更新action 类(有server类的set & get 方法及saveUser 方法)删除struts-config.xml 中action的type 属性
11、web.xml中添加配置
在web.xml配置文件中 copy
12、struts-config.xml中添加配置
在struts-config.xml配置文件中 copy
processorClass="org.springframework.web.struts.DelegatingRequestProce ssor">
13、Spring配置文件中添加配置
spring 配置文件中spring –> new bean
spring 配置文件中spring –> new bean
14、删除4个jar包
hibernate-annotations.jar asm-attrs.jar
asm.jar
cglib-2.1.3.jar