基于Eclipse的SSH2搭建的设计与开

上传人:壹****1 文档编号:506533187 上传时间:2024-01-16 格式:DOC 页数:19 大小:888KB
返回 下载 相关 举报
基于Eclipse的SSH2搭建的设计与开_第1页
第1页 / 共19页
基于Eclipse的SSH2搭建的设计与开_第2页
第2页 / 共19页
基于Eclipse的SSH2搭建的设计与开_第3页
第3页 / 共19页
基于Eclipse的SSH2搭建的设计与开_第4页
第4页 / 共19页
基于Eclipse的SSH2搭建的设计与开_第5页
第5页 / 共19页
点击查看更多>>
资源描述

《基于Eclipse的SSH2搭建的设计与开》由会员分享,可在线阅读,更多相关《基于Eclipse的SSH2搭建的设计与开(19页珍藏版)》请在金锄头文库上搜索。

1、基于Eclipse的SSH2搭建 Struts2.3.4+spring3.1.1+hibernate3.6Ssh2+ extjs Tomcat启动错误严重: Unable to find parent packages json-default缺少包严重: Context initialization failedorg.springframework.beans.factory.BeanCreationException: Error creating bean with name adminDAOImpl defined in ServletContext resource /WEB-IN

2、F/applicationContext_beans.xml: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name sessionFactory defined in ServletContext resource /WEB-INF/applicationContext_common.xml: Invocation of init method failed; nested

3、 exception is org.hibernate.HibernateException: JDBC Driver class not found: com.mysql.jdbc.Driver缺少添加jar包1 Struts2.3.4 如下图2 在Web.xml里 struts2 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter struts2 /* 3 src下添加 struts.xml !- -4 添加Spring3.1jar5 添加 Struts管理spring的插件插件包所在的位置6 添加 包

4、插件包所在的位置 7 web.xml里 org.springframework.web.context.ContextLoaderListener contextConfigLocation !- src目录下 classpath:applicationContext_*.xml - /WEB-INF/applicationContext_*.xml 8 WEB-INF 下添加applicationContext.xml9测试 新建index.jsp 和tt.jspindex.jsp的 body添加 建测试类TTTT.java内容package test;import com.opensymp

5、hony.xwork2.ActionSupport;public class TT extends ActionSupport private static final long serialVersionUID = 1L;public String test()System.out.println(TT test().);return tt;配置struts.xml /tt.jsp 配置 applicationContext.xml 10 添加hibernate3.6jar11 添加 mysql 驱动包12 src 目录 下添加 com.mysql.jdbc.Driverjdbc:mysql

6、:/yyltestroot org.hibernate.dialect.MySQL5Dialect !- 显示生成并执行的SQL语句 true-true !- 声明映射文件(.hbm.xml) 可以再spring的 sessionFactory指定目录集 - 13 Spring的AOP需要添加其他包和14 总结 Struts2.3.4+spring3.2+hibernate3.6的总jar包 15 ssh +extj4 1 web.xml s2.3.4s3.1h3.6 welcome- welcome- characterEncodingFilterorg.springframework.web.filter.CharacterEncodingFilter encoding utf-8 characterEncodingFilter /*

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 学术论文 > 论文指导/设计

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号