- 浏览: 245761 次
- 性别:
- 来自: 深圳
-
最新评论
-
di1984HIT:
写的不错。
使用JDBC进行批处理 -
huyuran:
...
使用JDBC进行批处理 -
chenbo0928:
[url][/url][img][/img][*]引用 ...
Removing a detached instance -
mousepc:
gklovejava 写道Utility method to ...
eclipse中的get/set功能的一个bug -
gklovejava:
Utility method to take a string ...
eclipse中的get/set功能的一个bug
文章列表
select和option操作
- 博客分类:
- javascript
http://www.jb51.net/article/16240.htm
javascript操作Select标记中options集合 先来看看options集合的这几个方法: options.add(option)方法向集合里添加一项option对象; options.remove(index)方法移除options集合中的指定项; options(index)或options.item(index)可以通过索引获取options集合的指定项;
stream.js
- 博客分类:
- javascript
http://www.aqee.net/docs/stream/
stream.js 是一个很小、完全独立的Javascript类库,它为你提供了一个新的Javascript数据结构:streams.
<script src='stream-min.js'></script>
下载 stream.js2Kb minified
streams是什么?
Streams 是一个操作 ...
<form method="post" action="result.jsp" target="_blank">
<input type=checkbox name=interest value="篮球">
篮球<p>
<input type=checkbox name=interest value=" 游泳">
游泳<p>
<input type=checkbox name=inte ...
如何从eclipse中卸载aptana
- 博客分类:
- eclipse
安装的aptana 3有问题,不能preview,theme也让人蛋疼,于是找方法卸载之。结果在中文搜索结果没有找到合适的,因为我是在线安装方式。于是重新google:How to remove aptana
结果第一条搜索结果让我解决了问题:
http://superuser.com/questions/166607/how-to-remove-aptana-from-eclipse
To remove a feature or plugin from Eclipse, open Eclipse and select "About Eclipse" from ...
会话和状态
- 博客分类:
- jsp servlet
会话
什么是会话?
会话可简单理解为:用户开一个浏览器,点击多个超链接,访问服务器多个web资源,然后关闭浏览器,整个过程称之为一个会话。
会话过程中要解决的一些问题?
每个用户在使用浏览器与服务器进行会话的过程中,不可避免各自会产生一些数据,服务器要想办法为每个用户保存这些数据。
例如:多个用户点击超链接通过一个servlet各自购买了一个商品,服务器应该想办法把每一个用户购买的商品保存在各自的地方,以便于这些用户点结帐servlet时,结帐servlet可以得到用户各自购买的商品为用户结帐。
提问:这些数据保存在request或servletContext中行不行?
...
css笔记
- 博客分类:
- javascript
样式表定义及引用
1 内联样式
在标记中直接使用style属性可以对该标记括起的内容应用该样式显示。
<p style="font-family:宋体;color:green;background-color:yellow;font-size:9pt">
<body style="font-family:宋体;font-size:12pt; ...
转自:http://www.qihangnet.com/blog/PermaLink-d19bc568-38be-40cd-94fc-881e0ba7ce42
".*"="application/octet-stream"
".001"="application/x-001"
".301"="application/x-301"
".323"="text/h323"
".906"="applicat ...
JavaScript Minifier failed for
var path=""+D:\projects\tomcat\webapps\ROOT\
alert(path);
var fileName = ""+trainingAttendHistoryExportRegister.html;
alert(fileName);
var mimeType = ""+;
alert(mimeType);
window.open("/html/portlet/ext/trainingmanagement/dow ...
struts给result添加多个参数问题
- 博客分类:
- struts
<result name="success">/html/portlet/ext/trainingmanagement/download_file.jsp?path=${path}&fileName=${fileName}&mimeType=${mimeType}</result>
比如这样的,你可能用&连接出错,因为struts.xml把它当做特殊字符处理了。所以需要把&替换为&
另外:你也可以这么做:
<action name="Test" method ...
错误原因查找:
1. 查看你的struts.xml 文件是否在src目录下;
2. 查看你的struts.xml语法是否正确;
3. 确认一下你是否在添加了<action><result></result></action>之后有没有重启tomcat,有没有重新build你的项目文件;(有可能是,你做的struts配置一个action之后,又去做了很久其他修改操作,忘记重启tomcat,当执行action的时候报这样的错误。)
4. 你的页面中的action可能需要添加namespace参数;
Inverse:负责控制关系,默认为false,也就是关系的两端都能控制,但这样会造成一些问题,更新的时候会因为两端都控制关系,于是重复更新,造成性能下降。一般来说有一端要设为true。
比如说Parent是one端,Child是many端,我们在Parent设置inverse=true。这样关系的维护就由Child来做。
没有inverse=true的时候。需要Parent.setChild(); Child.setParent();双方都来维护关系。现在在Parent中加入了inverse=true,只需要在Child端做child.setParent();就可以了。不需要Parent再 ...
TrainingStudent.hbm.xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<cl ...
批量删除table
- 博客分类:
- sql server
今天偶尔试出一个指删除table的sql语句,可能是我菜鸟哈,sql一直很弱:
drop table pub_info,publishers,authors
但是其中如果有外键关联的时候,无法删除一部分table,对于无法删除的table,可以再次这样删除一次就可以了。或者也可以把关联外键的表放到前面进行删除。
一个找jar包的网站
- 博客分类:
- java
http://www.docjar.com
Java Package/class Name
Keywords in Java source code
Jar file name
Classes in Jar file
它有上面四种查询方式,平时有找不到的类时,也不知道是哪个jar包里
所有的注解都是定义在getter方法的类名上的。
最好不要把类名或者字段名定义为数据库中的关键字相同!!!!!
JPA的配置文件persistence.xml是在META-INF文件夹下的
EntityManager,在对数据库做查询操作的时候,不需要开始事务,也就是说:
EntityManagerFactory factory=Persistence.createEntityManagerFactory();
EntityManager em=factory.createEntityManager();
em.getTransaction.begin();//开始 ...