Struts2+Soring3+Hibernate3整合环境配置.docx

上传人:b****6 文档编号:8446549 上传时间:2023-01-31 格式:DOCX 页数:12 大小:947.57KB
下载 相关 举报
Struts2+Soring3+Hibernate3整合环境配置.docx_第1页
第1页 / 共12页
Struts2+Soring3+Hibernate3整合环境配置.docx_第2页
第2页 / 共12页
Struts2+Soring3+Hibernate3整合环境配置.docx_第3页
第3页 / 共12页
Struts2+Soring3+Hibernate3整合环境配置.docx_第4页
第4页 / 共12页
Struts2+Soring3+Hibernate3整合环境配置.docx_第5页
第5页 / 共12页
点击查看更多>>
下载资源
资源描述

Struts2+Soring3+Hibernate3整合环境配置.docx

《Struts2+Soring3+Hibernate3整合环境配置.docx》由会员分享,可在线阅读,更多相关《Struts2+Soring3+Hibernate3整合环境配置.docx(12页珍藏版)》请在冰豆网上搜索。

Struts2+Soring3+Hibernate3整合环境配置.docx

Struts2+Soring3+Hibernate3整合环境配置

Spring3struts2Hibernate3整合

我看到网上很多ssh方案很过时或者不合适,所以根据自己的经验写了这个ssh整合方案,时间是2011-2-14,16.时32分,作者:

鲍继川,转载请注明出处。

Myeclipse8.6实现

1先整合springstruts

新建web工程,添加struts选择2.1,包选择core,还有struts-springlibrary两个

添加spring

注意applicationcontext.xml的位置是选在webroot/web-inf/下,如图

所有的包先晒晒

大致文件路径如下

Strutssping配置好后就是添加hibernatecapablity

一定要全选,因为sping-hibernate支持

Ok;框架搭配完成

2接下来是数据库连接,打开myeclipseDB

右键所选表后

选择HibernateReverseEngineering

一路next,finish

接下来就是整合配置。

先整合struts2和sping3

看web.xml文件

添加

contextConfigLocation

/WEB-INF/applicationContext.xml

org.springframework.web.context.ContextLoaderListener

这是必须的。

 

修改struts文件

添加action配置

m.jsp

n.jsp

自己写action哦。

点myeclipse的发布,不过要先装tomcat6

applicationContext.xml基本不变,这是HibernateReverse自动生成的。

发布后

右键项目runonserve

基本无错了哦。

不要点

就是这些完成。

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 解决方案 > 学习计划

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1