摘要: 1、创建java项目2、创建User Library,加入依赖包 * HIBERNATE_HOME/lib/*.jar * HIBERNATE_HOME/hibernate3.jar * 加入数据库驱动(mysql驱动) 3、提供hibernate.cfg.xml文件,完成基本的配置 4、建立实体类User.java5、提供User.hbm.xml文件,完成实体类的映射6、将User.hbm.xml文件加入到hibernate.cfg.xml文件中7、编写工具类ExoprtDB.java,将hbm生成ddl,也就是hbm2ddl8、建立客户端类Client,添加用户数据到mysql最好加入如下 阅读全文
posted @ 2013-04-10 22:08 FansZone 阅读(188) 评论(0) 推荐(0) 编辑
摘要: View Code 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="te 阅读全文
posted @ 2013-04-03 00:33 FansZone 阅读(568) 评论(0) 推荐(0) 编辑
摘要: 实现原理:使用<a>标签链接时应设置target属性,指定与iframe的name属性名称相同。例如:<a href="firstKind.html" target="right">产品I级分类设置</a> <iframe src="blank.html" name="right" width="1000" height="1000"></iframe> //blank.html为iframe默认打开的页面DEMO: 阅读全文
posted @ 2013-04-03 00:25 FansZone 阅读(4689) 评论(0) 推荐(0) 编辑
摘要: 一些struts的基础知识凡是名字是success的result都可以不写。 目录1.Struts1和Struts2的很大一个区别:2.具体Action的实现有三种方法:3.路径问题:4.Struts2配置 :5.Struts2配置文件:6.JDK1.5和1.6区别之一:7.Action接收参数的三种方法:8.Struts2的常用配置在:9.国际化:10.struts.xml里面包含其他xml配置:11.OGNL:对象图导航语言OGNL学习12.$#%的区别:13.Struts2里的UI标签里面有四个主题:14.声明式异常处理:15.I18N原理:16.其他小知识点 1.Struts1和S.. 阅读全文
posted @ 2013-03-30 11:19 FansZone 阅读(347) 评论(0) 推荐(1) 编辑
摘要: Struts2中支持文件上传与下载的两个JAR文件是:commons-fileupload-1.2.2.jarcommons-io-1.4.jar,这两个包要到apache网站上单独下载,下载网址是:http://commons.apache.org/fileupload/download_fileupload.cgi,可下载:commons-fileupload-1.2.2-bin.zip,解压后,在它的lib中有commons-fileupload-1.2.2.jarhttp://commons.apache.org/io/download_io.cgi,可下载:commons-io-1. 阅读全文
posted @ 2013-03-21 13:14 FansZone 阅读(324) 评论(0) 推荐(0) 编辑