- 博客(26)
- 资源 (21)
- 问答 (5)
- 收藏
- 关注
原创 hibernate---配置属性
1.hibernate.show_sql(1)在hibernate.cfg.xml中配置true(2)作用:在控制台输出所有的sql语句声明,这个在日志目录中是一个可选择的属性,它的值有两个true或者false。true:在控制台打印sql日志信息false:在控制台部打印sql日志信息2.hibernate.format_sql(1)在hibernate.cfg.x
2016-01-31 14:07:29 425
翻译 hibernate之hibernate.hbm2ddl.auto
Automatically validates or exports schema DDL to the database when the SessionFactory is created. With create-drop, the database schema will be dropped when theSessionFactory is closed explicitly.
2016-01-31 11:17:13 454
原创 hibernate-----模拟hibernate原理
Student.javapackage com.dqpi.eonline.model;public class Student { private int id; private String name; private int age; public int getId() { return id; } public void setId(int id) { th
2016-01-31 01:02:38 313
原创 hibernate之AnnotationConfigration
原来在hibernate中如果要用注解的时候,需要在获取configration对象的时候new一个AnnotationConfigration(),但是在hibernate5.0.7中可以直接用Configuration configuration = new Configuration();而可以不用Configuration configuration = new Annotatio
2016-01-30 17:39:57 402
原创 hibernate-----异常(1)
Exception in thread "main" java.util.ServiceConfigurationError: org.hibernate.boot.model.TypeContributor: Provider org.hibernate.type.Java8DateTimeTypeContributor not found at java.util.ServiceLoader
2016-01-30 16:53:13 1193
原创 struts2标签
各种标签的使用,包括标签的每个属性尅自己去下载最新的官方文档去阅读学习其中有控制标签,数据标签,UI标签等等struts.xml<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" "http://struts.apache.org/dtds/struts
2016-01-28 23:23:41 434
原创 struts2之OGNL表达式
OGNL表达式一般用来取值,下面通过这个例子程序,来看看ognl表达式(1)使用ognl表达式的时候需要在struts.xml文件中配置这句话 struts.xml<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" "http://struts.ap
2016-01-28 22:51:50 437
原创 struts2带参数的结果集
struts.xml<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" "http://struts.apache.org/dtds/struts-2.3.dtd"> /user_success.jsp?t=${t
2016-01-28 22:44:31 442
原创 struts2动态结果
struts.xml<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" "http://struts.apache.org/dtds/struts-2.3.dtd">
2016-01-28 22:40:23 352
原创 struts2全局结果
struts.xml<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" "http://struts.apache.org/dtds/struts-2.3.dtd"> /main.jsp /index.jsp
2016-01-28 22:27:45 328
原创 struts2结果类型
(1)dispatcher:被用作web资源整合,包括jsp的整合,是属于服务器端跳转(2)redirect:属于客户端跳转,被用来跳转到另外一个URL上面(3)chain:是一种action的动作链接(4)redirectAction:用于重定向到另一个动作映射(5)freemarker:用来整合freemarker(6)HttpHeader:用来控制特殊的HTTP协议行为
2016-01-28 22:16:24 311
原创 struts2 默认action
默认的action一般用来当某处请求错误时,然后就跳转到默认的action给用户一个友好的界面提示struts.xml<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" "http://struts.apache.org/dtds/struts-2.3.dt
2016-01-28 22:11:18 332
原创 struts2模块包含
struts.xml<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" "http://struts.apache.org/dtds/struts-2.3.dtd"> login.xml<!DOCTYPE struts PUBL
2016-01-28 22:08:20 403
原创 struts2访问web元素
struts.xml<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" "http://struts.apache.org/dtds/struts-2.3.dtd">
2016-01-28 22:03:11 323
原创 struts2简单数据校验
<%String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%> "> My JSP 'index.jsp' star
2016-01-28 21:42:59 302
原创 struts2中文乱码
通过配置struts.xml中的常量 <constantname="struts.i18n.encoding=UTF-8" value="true"/>可以解决中文乱码。注:该配置可以在文档中的struts.properties中可以找到。index.jsp<span style="font-size:18px;"><%@ page languag...
2016-01-28 21:36:20 548
原创 struts2接收参数的方法
struts2接收参数的方法总共有三种(1)通过属性接受参数(推荐使用)(2)使用Domain Model来接受参数(推荐使用)(3)使用ModelDriven来接受参数(并不常用)struts.xml<span style="font-size:18px;"><?xml version="1.0" encoding="UTF-8" ?>...
2016-01-28 21:17:18 316
原创 struts2通配符
(1)使用通配符,将配置量降到最低(2)一定要遵守“约定优于配置”的原则。(3)*,{1},{2},…,*_*,…struts.xml<span style="font-size:18px;"><?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE struts PUBLIC "-//Apache ...
2016-01-28 20:53:40 385
原创 struts2动态方法调用(DMI)
(1)Action执行的时候并不一定要执行execute方法(2)可以在配置文件中配置action的时候用method=来指定执行哪个方法,也可以在url中动态指定(动态方法调用DMI)(推荐使用)(3)第一种会产生太多的action,所以不推荐使用。(4)如果使用DMI的方式,在struts.xml配置文件中需要设置:<constantname="struts.enable...
2016-01-28 20:42:26 619
原创 struts2路径问题
(1)struts2中的路径问题是根据action的路径而不是jsp路径来确定的,所以尽量不要使用相对路径(2)虽然可以使用redirect方式解决,但是redirect方式并非必要(3)解决方法非常简单,统一使用绝对路径。(在jsp中用request.getContextRoot方式拿到webapp的路径)或者使用myeclipse经常用的指定basepath.struts.xml...
2016-01-28 20:34:38 328
原创 struts2之Action
(1)具体的视图的返回可以由用户自己定义的action来决定(2)具体的手段是根据返回的字符串找到对应的配置项,来决定视图的内容(3)具体的action的实现:(a)可以是一个普通的java类,里面有publicString execute()方法<span style="font-size:18px;">package com.dqpi.eonline;/** ...
2016-01-28 20:29:12 280
原创 struts2之namespace
1.struts.xml<span style="font-size:18px;"><?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" "http...
2016-01-28 20:21:59 281
原创 struts2——HelloWorld
1.strutx.xml的配置<span style="font-size:18px;"><?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" "h...
2016-01-28 20:16:05 281
原创 struts2学习前的准备
一.开发环境准备1.struts2软件下载地址:http://struts.apache.org/index.html2.开发工具myeclipse下载地址:http://www.myeclipsecn.com/3.JDK下载地址:http://www.oracle.com/technetwork/java/javase/downloads/inde...
2016-01-28 20:07:51 456
原创 CSS基础
一.认识CSS1.css全称是“层叠样式表cascadingstyle sheets”,它主要是用于定义HTML内容在浏览器内的显示样式,比如文字大小,颜色,字体加粗等2.使用css样式的一个好处是通过定义某个样式,可以让不同网页位置的文字有着统一的字体,字号或者颜色等。二.CSS代码语法1.css样式由选择符和声明组成,而声明又是由属性...
2016-01-20 22:11:57 677
原创 HTML
一.HTML和CSS的关系1.HTML是网页内容的载体。内容就是网页制作者放在页面上想要让用户浏览的信息,可以包含文字、图片、视频等。2.CSS样式是表现。就像网页的外衣,比如,标题字体、颜色变化、或为标题加入背景图片、边框等。所有这些用来改变内容外观的东西称之为表现。3.JavaScript是用来实现网页上的特效效果。如:鼠标滑过弹出下拉菜单,或鼠标滑过表格的背景颜色改变,还有焦点新...
2016-01-19 21:26:06 647
javascript代码执行结果分析
2016-09-01
android毕设中使用了xutils,但是出现了问题
2016-04-06
在使用gson时,创建该对象但是不能导入Gson类
2016-04-06
chrome访问一个json文件中文乱码
2016-04-05
关于空格,有空格就报500错误,没有空格就不报错,这是什么原因
2015-05-31
TA创建的收藏夹 TA关注的收藏夹
TA关注的人