搭建SSH框架Struts2.1、Spring2.5、Hibernate3.3
2012-10-22 15:37
525 查看
Web Project这个都会吧!细细
版本
Struts2.1、Spring2.5、Hibernate3.3
1.MyEclipse add Struts2.1 → /* Struts2 Spring Libraries(导入这个包)
2.MyEclipse add Spring导入AOP 、Spring2.5 Presistence Core 、Spring2.5 Presistence JDBC、Spring2.5 Web Libraries
3.MyEclipse add Hibernate3.3 选第二个 Spring onfiguration file(applicationContext.xml) →Existing Spring onfiguration file →选择数据源→不创建SessionFactory
4.web.xml配置 在Dsign配置,找到Context Parameters →Parameter name填:contextConfigLocation;Parameter value填:classpath:applicationContext.xml(如果applicationContext.xml放在src下面写classpath,如果放在WEB-INF/lib/下就这么写/WEB-INF/lib/applicationContext.xml)
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/lib/applicationContext.xml</param-value>
</context-param>
5.Listeners →Browse 写上contextLoader就有提示contextLoaderListener就ok了
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
之后就部署吧!
SSH Demo下载地址Mysql数据库http://pan.baidu.com/share/link?shareid=152796&uk=1712110123
因之前搭建ssh总出错!之后总结了一下,本人学生仅供其他学生参考,不喜勿喷!谢谢
版本
Struts2.1、Spring2.5、Hibernate3.3
1.MyEclipse add Struts2.1 → /* Struts2 Spring Libraries(导入这个包)
2.MyEclipse add Spring导入AOP 、Spring2.5 Presistence Core 、Spring2.5 Presistence JDBC、Spring2.5 Web Libraries
3.MyEclipse add Hibernate3.3 选第二个 Spring onfiguration file(applicationContext.xml) →Existing Spring onfiguration file →选择数据源→不创建SessionFactory
4.web.xml配置 在Dsign配置,找到Context Parameters →Parameter name填:contextConfigLocation;Parameter value填:classpath:applicationContext.xml(如果applicationContext.xml放在src下面写classpath,如果放在WEB-INF/lib/下就这么写/WEB-INF/lib/applicationContext.xml)
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/lib/applicationContext.xml</param-value>
</context-param>
5.Listeners →Browse 写上contextLoader就有提示contextLoaderListener就ok了
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
之后就部署吧!
SSH Demo下载地址Mysql数据库http://pan.baidu.com/share/link?shareid=152796&uk=1712110123
因之前搭建ssh总出错!之后总结了一下,本人学生仅供其他学生参考,不喜勿喷!谢谢
相关文章推荐
- 用MyEclipse搭建SSH框架 Struts2.1 Spring3.0 Hibernate3.3 搭建SSH框架
- 爱4妮 struts2.1 + hibernate3.3 +spring2.5 + 仿Google数字分页
- struts1.2 + spring2.5 + hibernate3.2框架搭建二之配置文件
- Struts2.0 + Spring2.5 + Hibernate3.3开发环境的配置(2)
- Spring2.5、Struts2.1、Hibernate3.2、sitemesh、freemarker整合开发常见问题及解决方案
- struts1.2 + spring2.5 + hibernate3.2框架搭建三之后台代码
- Struts2.0 + Spring2.5 + Hibernate3.3开发环境的配置(3)
- struts1.2 + spring2.5 + hibernate3.2框架搭建四之前台页面
- 用MyEclipse搭建SSH框架 Struts Spring Hibernate
- 用MyEclipse搭建SSH框架 Struts Spring Hibernate
- 用MyEclipse搭建SSH框架 Struts Spring Hibernate
- struts+spring+hibernate项目开发环境的搭建——eclipse3.3+MyEclipse6.0+MySql4.1
- 用MyEclipse搭建SSH框架 Struts Spring Hibernate
- SSH(Spring3.0 + Struts2.1 + Hibernate3.3)整合示例
- struts1.2 + spring2.5 + hibernate3.2框架搭建一之工程总览
- Spring学习8-用MyEclipse搭建SSH框架 Struts Spring Hibernate
- ssh框架搭建Struts2.06+spring2.5+hibernate3.2整合实例代码教程步骤
- 用MyEclipse搭建SSH框架 Struts Spring Hibernate
- 用MyEclipse搭建SSH框架 Struts Spring Hibernate
- 框架整合之--------spring2.5+struts2.1+hibernate3.6