《ssh2框架整合学习资料.doc》由会员分享,可在线阅读,更多相关《ssh2框架整合学习资料.doc(17页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、Good is good, but better carries it.精益求精,善益求善。ssh2框架整合-SSH2框架整合1搭建环境说明SSH2整合环境:Spring:spring2.5Struts:struts2.1.6Hibernate:hibernate3.3.1数据库:oracle9iMyeclipse:myeclipse6.5Tomcat:tomcat62整合2.1所需jar包列表Struts2所需jar包:Struts2-core-2.1.11.jarcommons-logging-1.0.4.jarcommons-fileupload-1.2.1.jarfreemarker-
2、2.3.13.jarognl-2.6.11.jarstruts2-spring-plugin-2.1.6.jar((struts2与spring整合所需)xwork-2.1.2.jarHibernate3.3所需jar包:antlr-2.7.6.jarc3p0-0.9.1.jardom4j-1.6.1.jarhibernate3.jarjta-1.1.jarlog4j-1.2.15.jarojdbc14.jarslf4j-api-1.5.2.jarslf4j-log4j12.jarSpring2.5所需jar包:Spring.jarJson所需的包Json-lib-2.1.jarJsonplu
3、gin-0.34.jar其他jarSlf4j-api-1.5.2.jarSlf4j-log4j12.jarJavassist-31.4.GA.jarCommons-dbcp.jarCommons-pool-1.3.jarCommons-collections-3.1.jar2.2添加applicationContext.xml文件在WEB-INF目录下新建文件applicationContext.xml。添加内容如下:org.hibernate.dialect.Oracle9Dialecttrueclasspath:com/ssh2/mapping!-com/ssh2/mapping/AppU
4、ser.hbm.xml-PROPAGATION_REQUIREDPROPAGATION_REQUIREDPROPAGATION_REQUIREDPROPAGATION_REQUIREDPROPAGATION_REQUIRED,readOnly2.3添加struts.xml文件/WEB-INF/jsp/userinfo/UserManage.jsp/WEB-INF/jsp/userinfo/UserManage.jsp/WEB-INF/jsp/userinfo/UserAdd.jsp2.4修改web.xml文件web-appversion=2.5xmlns=xmlns:xsi=http:/www
5、.w3.org/2001/XMLSchema-instancexsi:schemaLocation=contextConfigLocation/WEB-INF/config/applicationContext.xmlorg.springframework.web.context.ContextLoaderListenerstruts2org.apache.struts2.dispatcher.FilterDispatcherstruts2/*encodingFilterorg.springframework.web.filter.CharacterEncodingFilterencodingGBKindex.jsp3问题记录1.java.lang.ClassNotFoundException:mons.collections.map.LRUMapcommons-collections.jar未导入或包版本过低。2.java.lang.NoClassDefFoundError:javassist/util/proxy/MethodFilter缺少javassist-3.4.GA.jar包3.-
限制150内