`
文章列表

fileutil

import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.List; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import java.util.zip. ...

语法高亮

语法高亮

dbutil

import java.io.IOException; import java.io.InputStream; import java.sql.CallableStatement; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.sql ...

AjaxRPC

1.引入jar包 AJAXRPC.jar   和 flexjson.jar 2.描述RPC 编写一个public static方法  package service; public class UserService { public static String hello(String name) { return "hello" + name; } }   WEB-INF/rpc-config.xml <?xml version="1.0" encoding="UTF-8"?> &l ...

基本框架

<html> <head> <title></title> <link href="edo/res/css/edo-all.css" rel="stylesheet" type="text/css" /> </head> <body> </body> </html> <script src="edo/edo.js" type="text/javascript&qu ...

jQuery

$.fn.menu = function (url, fn) { var ret = null; $.ajax({type:"get", async:false, url:url, success:function (d) { ret = (eval("(" + d + ")")); }}); var docH = $("#center").height(); var mhead = $("<div>").html("\u7cfb\u7edf\u83 ...
var Ajax = function(url, params, callback) {    var reqError = "\u54cd\u5e94\u5f02\u5e38\uff01\uff01\uff01";    var sendData = null;    var createXHR = function () {        var XHR;        if (window.XMLHttpRequest) {            XHR = new XMLHttpRequest(); ...

我的新tree

function Node(id, pid, text, href, icon) { this.id = id; this.pid = pid || null; this.text = text || null; this.href = href || null; this.icon = icon || null; this.leaf = true; this.level = 0; this.parent = null; this.tabletree = null; this.childNodes = []; var chk = document.createElement("inpu ...

我的新菜单

function Menu() {    this.tbarH = 34;    this.bbarH = 28;    this.barH = 27;    this.emendation = document.all ? 5 : 11;    this.tbarCss = "border:1px solid #99BBE8;background:url(images/tbar-bg.gif) repeat-x;font-weight: bold;color:#15428B;line-height:34;height:" + this.tbarH + "px&qu ...

我的menu

function Menu() { this.tbarH = 28; this.bbarH = 28; this.barH = 25; this.container; if (!arguments[0]) { alert("\u8bf7\u5728\u521b\u5efa\u83dc\u5355\u65f6\u6307\u5b9a\u83dc\u5355\u7684\u5bb9\u5668"); return; } if (typeof (arguments[0]) == ...

Freemaker

1.添加freemaker.jar包 2.servlet中 Configuration conf = new Configuration(); conf.setServletContextForTemplateLoading(this.getServletContext(), "web"); conf.setDefaultEncoding("UTF-8"); Template tpl = conf.getTemplate("list.htm" ...

Hessian

public interface IBasic { /** * 测试字符串 * @return */ public String hello(); /** * 取一辆汽车 测试对象传递 * @return */ public Car getCar(); }   public class BasicService implemen ...

JMS

1.发送消息 public static void send() { try { ConnectionFactory connectionFactory = new ActiveMQConnectionFactory( "tcp://10.47.224.169:61616"); Connection connection = connectionFactory.createConnection(); conne ...
1.加入iBatis.jar和数据库驱动包 2.编写全局配置文件(数据库配置)sqlMapConfig.xml <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" "http://www.ibatis.com/dtd/sql-map-config-2.dtd"> <sqlMapConfig> ...
前段时间做一个Demo,需要在里面实现实时的系统内存、CPU、线程等信息。考虑Ajax的Polling来实现,但发现CPU很高,频繁的Ajax访问,服务器受不了呀。 目前,初步实现push的服务器还不成熟。servlet3.0,Tomcat等有实现,但很麻烦。 幸好08年有DWR的使用经历,DWR3.0的反向功能,让我看到了希望。下面来说说他实现的一个及时聊天吧。 1.导入dwr.jar 2.servlet配置 <servlet> <servlet-name>dwr-invoker</servlet-name> <servlet-c ...
Global site tag (gtag.js) - Google Analytics