自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(113)
  • 资源 (4)
  • 收藏
  • 关注

原创 为Spring Security添加LDAP内嵌测试服务器真是麻烦!

居然要加这么多JAR apacheds-core-1.0.2.jarapacheds-core-shared-1.0.2.jarapacheds-kerberos-shared-1.0.2.jarapacheds-protocol-changepw-1.0.2.jarapacheds-protocol-kerberos-1.0.2.jarapacheds-protocol-ldap-1.0

2009-10-25 23:12:00 835

为Spring Security添加LDAP内嵌测试服务器真是麻烦!

居然要加这么多JARapacheds-core-1.0.2.jarapacheds-core-shared-1.0.2.jarapacheds-kerberos-shared-1.0.2.jarapacheds-protocol-changepw-1.0.2.jarapacheds-protocol-kerberos-1.0.2.jarapacheds-protocol-ldap-1.0....

2009-10-25 23:12:00 127

转载 Java路径问题最终解决方案

資料來源:http://louisyoo.blog.ccidnet.com/blog-htm-do-showone-uid-41414-type-blog-itemid-217488.html前言 Java的路径问题,非常难搞。最近的工作涉及到创建和读取文件的工作,这里我就给大家彻底得解决Java路径问题。我编写了一个方法,比ClassLoader.getResource(String 相对路

2009-07-15 23:12:00 584

Java路径问题最终解决方案

資料來源:http://louisyoo.blog.ccidnet.com/blog-htm-do-showone-uid-41414-type-blog-itemid-217488.html前言 Java的路径问题,非常难搞。最近的工作涉及到创建和读取文件的工作,这里我就给大家彻底得解决Java路径问题。我编写了一个方法,比ClassLoader.getResource(String 相对路...

2009-07-15 23:12:00 58

原创 Open debug mode for Tomcat and use Eclipse to remote debug the application

Today I tried to use remote debugging with Eclipse and Tomcat.I usually use a Tomcat Sysdeo Plugin to run Tomcat inside Eclipse, but today I faced remote debugging.To run tomcat in remote debugging yo

2009-06-25 14:12:00 2045

Open debug mode for Tomcat and use Eclipse to remote debug the application

Today I tried to use remote debugging with Eclipse and Tomcat.I usually use a Tomcat Sysdeo Plugin to run Tomcat inside Eclipse, but today I faced remote debugging.To run tomcat in remote debugging yo...

2009-06-25 14:12:00 96

转载 struts2中用interceptor实现权限控制

struts2中用interceptor实现权限控制收藏在jsp servlet中我们通常使用Servlet Filter控制用户是否登入, 是否有权限转到某个页面.在struts2中我们应该会想到他的拦截器(Interceptor), Interceptor在struts2中起着非常重要的作用. 很多struts2中的功能都是使用Interceptor实现的. 需求:简单的登入界面,让用户输

2009-06-10 10:31:00 1885 1

struts2中用interceptor实现权限控制

struts2中用interceptor实现权限控制收藏在jsp servlet中我们通常使用Servlet Filter控制用户是否登入, 是否有权限转到某个页面.在struts2中我们应该会想到他的拦截器(Interceptor), Interceptor在struts2中起着非常重要的作用. 很多struts2中的功能都是使用Interceptor实现的. 需求:简单的登入界面,让用户输...

2009-06-10 10:31:00 60

转载 List of HTTP headers

From http://en.wikipedia.org/wiki/List_of_HTTP_headers

2009-05-31 14:37:00 452

List of HTTP headers

From http://en.wikipedia.org/wiki/List_of_HTTP_headers

2009-05-31 14:37:00 67

原创 Force "Save file" dialog on the JSP page

If you want to force pop up "Save File" dialog to ask user save file from server.We need to set the several parameter to response.the first is content type.  response.setContentType("applicati

2009-05-31 14:14:00 783

Force "Save file" dialog on the JSP page

If you want to force pop up "Save File" dialog to ask user save file from server.We need to set the several parameter toresponse.the first is content type. response.setContentType("application...

2009-05-31 14:14:00 72

原创 Content Type type

 内容类型内容类型(Content-Type),这个头部领域用于指定消息的类型。一般以下面的形式出现。Content-Type: [type]/[subtype]; parametertype有下面的形式。Text:用于标准化地表示的文本信息,文本消息可以是多种字符集和或者多种格式的; Multipart:用于连接消息体的多个部分构成一个消息,这些部分可以是不同类型

2009-05-31 14:11:00 1608

Content Type type

内容类型内容类型(Content-Type),这个头部领域用于指定消息的类型。一般以下面的形式出现。Content-Type: [type]/[subtype]; parametertype有下面的形式。Text:用于标准化地表示的文本信息,文本消息可以是多种字符集和或者多种格式的; Multipart:用于连接消息体的多个部分构成一个消息,这些部分可以是不同类型的数据;...

2009-05-31 14:11:00 145

转载 The significance of the class search path

The significance of the class search pathAn understanding of the class search path is important for all Java developers. However, the widespread use of integrated development tools has concealed the

2009-05-19 15:03:00 738

原创 Create Swing Image Button

WE can put a image to the swing JButton  to create a icon button.ImageIcon iconDel = new ImageIcon(path);btnDel = new JButton(iconDel);   To make the button have better appearance. we can se

2009-05-19 14:38:00 627

转载 进一步提升 Struts 2 对 Velocity 的支持力度

 原帖地址: 进一步提升 Struts 2 对 Velocity 的支持力度

2009-05-14 09:33:00 476

转载 Advanced Event Registration Model

On this page I explain the two advanced event registration models: W3C’s and Microsoft’s. Since neither is cross–browser supported, their use is, for the moment, deprecated.W3C and Microsoft have bo

2009-05-13 23:00:00 546

原创 DOJO + Eclipse

Dojo + Eclipsehttp://www.dojotoolkit.com/forum/dojo-foundation/general-discussion/eclipse-3-4-and-jsdt-pluginMeet the JavaScript Development Toolkithttp://www.ibm.com/developerworks/library/os-eclip

2009-05-11 15:14:00 844

原创 Add dojo widget programmatically

 We can add the dojo widget programmtically in the Javascript section. Like this: <!--var datepicker = dojo.widget.createWidget( "struts:StrutsDatePicker", {

2009-05-11 14:11:00 596

原创 Select 操作

1判断select选项中 是否存在Value="paraValue"的Item 2向select选项中 加入一个Item 3从select选项中 删除一个Item 4删除select中选中的项 5修改select选项中 value="paraValue"的text为"paraText" 6设置select中text="paraText"的第一个Item为选中 7设置select中value="pa

2009-05-07 09:43:00 561

原创 使用Struts2 AJAX TAG的 formFilter标签

网上找了半天没有找到好的例子,居然在Review Struts2文档的时候找到一个使用formFilter的例子。其实很简单,就是原来不知道怎么写。现在摘录下来。 "text/javascript"> function filter(field) { return field.name == "firstName"; }"userData">

2009-05-04 23:23:00 1005

转载 Struts2 Architechure Figure

2009-04-29 22:07:00 545

原创 Java Persistence/Identity and Sequencing

Java Persistence/Identity and Sequencing Common Problemsnull is inserted into the database, or error on insert.This typically occurs because the @Id was not configured to use an @GeneratedVa

2009-04-28 23:08:00 632

原创 ERROR [ValidatorFileParser] Attribute "short-circuit" must be declared forelement type "field-validator".

  DTD version error "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd"> Needed: "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">

2009-04-23 23:28:00 1183

原创 SQL Server 2005 中文乱码解决

 中文存到数据库中总是显示乱码。DEBUG发现页面中文到Service都是正确的中文。试着在数据库中把字段值改为中文(字段类型为Nvarchar),结果页面上可以正确显示,说明页面设置正确。 问题出在数据库层。后来检查数据库连接字段,发现一个参数 sendStringParametersAsUnicode=false将其改为 sendStringParametersAsUnicode=

2009-04-21 14:52:00 10016

原创 在onload上加载执行多个函数

有时候需要用到window.onload函数,但是window.onload函数已经被赋值过了,如果要想加载多个函数,我们要这么写 function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != function) {

2009-04-21 08:41:00 1026

转载 Handle Back Button

Mastering The Back Button With JavascriptFiled: Wed, Feb 28 2007 under Programming|| Tags: ajax history secure sessionsAsk how to control the back button on a forum and youll be quickly lectured

2009-04-19 00:04:00 1187

原创 onbeforeunload and onunload event

onbeforeunload与onunload事件Onunload,onbeforeunload都是在刷新或关闭时调用,可以在脚本中通过window.onunload来指定或者在里指定。区别在于onbeforeunload在onunload之前执行,它还可以阻止onunload的执行。  Onbeforeunload也是在页面刷新或关闭时调用,Onbeforeunload是

2009-04-18 22:36:00 566

转载 EJB3.0 JPQL 

JPQL就是一种查询语言,具有与SQL 相类似的特征,JPQL是完全面向对象的,具备继承、多态和关联等特性,和hibernate HQL很相似。 查询语句的参数JPQL语句支持两种方式的参数定义方式: 命名参数和位置参数。。在同一个查询语句中只允许使用一种参数定义方式。 命令参数的格式为:“: +参数名”例:Query query = em.createQuery("s

2009-04-17 14:46:00 1031

转载 JPA Annotation Reference

Table 1-1 JPA Annotations by CategoryCategoryDescriptionAnnotationsEntityBy default, TopLink JPA assumes that a Java class is non-persistent and not eligible for JPA servic

2009-04-14 14:27:00 2036

转载 JPA Primary Keys through ManyToOne Relationships problem

A common model is to have a dependent object share the primary key of its parent. In the case of a OneToOne the childs primary key is the same as the parent, and in the case of a ManyToOne the child

2009-04-14 13:47:00 2784

原创 JavaScript

var theTable = document.getElementsByTagName("table")[0];//Here close one tr as templatevar newRowTemplate = theTable.rows[theTable.rows.length-1].cloneNode(true);//Must be tbody, Can not appe

2009-04-13 17:22:00 455

原创 Can not disable IE default shortcut key Action

 I tried to capture the key press event action in the web page and it all works very well by this way. if (keyCode == 113) {            //alert("F2");         add();But when tried to disable IE de

2009-04-10 09:48:00 752

转载 KeyBoard Key code

TasteKey CodeTasteKey CodeTasteKey Codebackspace8tab9enter13shift16ctrl17alt18pause/break19caps lock20escape27page up3

2009-04-10 09:45:00 771

原创 类 java.math.BigDecimal 总结

变量 ROUND_UP public static final int ROUND_UP 总是在非零的舍弃小数(即截断)之前增加数字。 注意该舍入模式不减少量值。 (从零开始舍入) ROUND_DOWN public static final int ROUND_DOWN 从不在舍弃的小数(即截断)之前增加数字。 注意该舍入模式不增加量值。 (舍入到零)

2006-07-04 19:22:00 1089

原创 类 java.math.BigDecimal 总结

变量 ROUND_UP public static final int ROUND_UP 总是在非零的舍弃小数(即截断)之前增加数字。 注意该舍入模式不减少量值。 (从零开始舍入) ROUND_DOWN public static final int ROUND_DOWN 从不在舍弃的小数(即截断)之前增加数字。 注意该舍入模式不增加量值。 (舍入到零)

2006-07-04 19:15:00 1304

转载 Map 遍历里面的元素

java.util 中的集合类包含 Java 中某些最常用的类。 最常用的集合类是 List 和 Map。 List 的具体实现包括 ArrayList 和 Vector,它们是可变大小的列表,比较适合构建、存储和操作任何类型对象的元素列表。 List 适用于按数值索引访问元素的情形。 Map 提供了一个更通用的元素存储方法。 Map 集合类用于存储元素对(称作“键”和“值”),其中每个键映射

2006-06-07 13:15:00 5772

原创 MAP 大概介绍

核心 Map Java 自带了各种 Map 类。 这些 Map 类可归为三种类型: 通用 Map,用于在应用程序中管理映射,通常在 java.util 程序包中实现 HashMap Hashtable Properties LinkedHashMap Identi

2006-06-07 13:14:00 1683

转载 LinkedHashMap 特性 按插入和访问顺序排序

LinkedHashMap extends HashMapLinkedHashMap的特性:Linked内部含有一个private transient Entry header;来记录元素插入的顺序或者是元素被访问的顺序。利用这个线性结构的对象,可以帮助记录entry加入的前后顺序或者记录entry被访问的频率(最少被访问的entry靠前,最近访问的entry靠后)。大致的过程如下:new Lin

2006-06-07 13:11:00 2919

Struts2 Design And Programming

Overview Offering both theoretical explanations and real-world applications, this in-depth guide covers the 2.0 version of Struts, revealing how to design, build, and improve Java-based Web applications within the Struts development framework. Feature functionality is explained in detail to help programmers choose the most appropriate feature to accomplish their objectives, while other chapters are devoted to file uploading, paging, and object caching.

2009-05-17

XML Generation By Java

Different way to generate xml. DOM, SAX, JAXP

2009-05-17

JUnit Recipes

As Test-Driven Development practitioners, we have a tendency to write about JUnit exclusively as a tool for writing Object Tests. Because much of the JUnit community intersects with the TDD community, this seems like a reasonable thing to do; however, you may not be a TDD practitioner. Your current project may use JUnit, but only to write tests for existing code or to write tests at a higher-level view of the system than its objects. We would hate to leave you out of the conversation, as JUnit is certainly suitable for writing other kinds of tests.

2008-11-27

远程镜像与备份SVN 服务器

远程镜像与备份SVN 服务器 此文讲述SVN 如何镜像服务器,注意是单向镜像。众所周知,SVN 有自已的镜像命令

2008-11-27

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除