那个属于王子的年代,已经无法复制。虽已走过花期,整个大地却都保留着对他惊艳的记忆。岁月终会流逝,年华终要老去,唯一不老的是一颗永怀激情的心。
jayjayjaylun · 共 74 篇文章
Thread context class loader
security.MyClassLoaderTest 入口点 Class security.MyClassLoaderTest package security; import java.lang.reflect.Method; import java.net.URL; public class MyClassLoaderTest { public static void main(final String[] args) throws Exception { URL[] urls = new URL[] {new URL("file://C:/temp4Java/external_clas…
2012-03-16 13:08 · java · 评论(0)
I'm confused on the need for the "resource-ref" in web
http://stackoverflow.com/questions/2887967/what-is-resource-ref-in-web-xml-used-for
2011-07-16 12:38 · java · 评论(0)
负载均衡环境中和如何设置Expires和Etag(转载)
(2009-07-10 11:20:22) 转载 标签: http 杂谈 分类:php 在负载均衡环境中(LVS, LoadBalance)为了减少浏览器数据的重复请求操作,一般需要设置 Http Header 的 Etage 和 Expires 告诉浏览器请求数据是否已过期。以下内容主要考虑Apache+squid 环境。 ETag Header是文件修改时间、文件大小和inode号生成的校验(checksum),在多台服务器的负载均衡环境下会因部署内容的inode节点差异造成 ETag 的不同,在多台WEB前端做负载均衡的情况下,会因为请求同一个数据但不同机器的 ETag 而影响了响应.…
2011-01-11 15:42 · web · 评论(0)
jdbctemp 事务
<%@ page import="java.net.URLEncoder"%> <%@ page import="org.springframework.web.context.support.WebApplicationContextUtils"%> <%@ page import="java.util.*"%> <%@ page import="java.text.SimpleDateFormat"%> <%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> <%@ ta…
2011-01-10 12:16 · java · 评论(0)
Starting httpd: (13)Permission denied: make_sock: could not bind to address [::]
In Fedora Core 5/6 and RHEL 5. We have made it easier to customize certain common parts of SELinux. In previous releases of SELinux if you wanted to change simple things like which port a daemon could listen to, you would need to write policy. Now we have the semanage utility. SELinux assigns types…
2011-01-09 08:56 · linux · 评论(0)
ant 编译路经
<project name="avm" default="hkdev22" basedir="."> <description> The build file for AVM project </description> <!-- set global properties for this build --> <property name="prj_name" value="avm" /> <property name="src" location="src" /> <property name="build" location="build" /> <property name="dis…
2010-12-27 11:35 · java · 评论(0)
char 向上转型
import java.util.Timer; import java.util.TimerTask; class NvWa{ public void find(short i){ System.out.println("(short) i"); } public void find(float i){ System.out.println("(float) i"); } public void find(int i){ System.out.println("(int) i"); } public void find(Integer i){ System.out.println("(Int…
2010-12-21 09:36 · thinking in java · 评论(0)
jsp forward out.flush()
<%@ page language="java" pageEncoding="UTF-8" autoFlush="true" buffer="10kb" contentType="text/html; charset=UTF-8"%> <% String name=""; for(int i = 0 ;i<1024*10; i++){ name+="D"; } System.out.println(" ===========name : " +name.length()); System.out.println(" =========== buffer size : " + out.getB…
2010-12-20 17:27 · java · 评论(0)
page buffer autoFlush
<%@ page language="java" pageEncoding="UTF-8" autoFlush="false" buffer="10kb" contentType="text/html; charset=UTF-8"%><% //jsp.error.page.badCombo //autoFlush="false" buffer="none" /*** 从源码 可以看出 out 最后将自动清理缓存//所以要测试 autoFlush 和 buffer 将采用 out.getBufferSize() 和 out.clear() 结合测试. } catch (Throwable t…
2010-12-20 16:30 · java · 评论(0)
runtime shutdown hook
void java.lang. Runtime .addShutdownHook( Thread hook) Registers a new virtual-machine shutdown hook. The Java virtual machine shuts down in response to two kinds of events: The program exits normally, when the last non-daemon thread exits or when the exit (equivalently, System.exit ) method is inv…
2010-12-20 10:14 · java · 评论(0)
SpringMVC resolver
IndexDelegateAction package com.gt.kathleen.http.action.api; import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.swing.text.View; import org.springframework.web.servlet.ModelAndView; public class I…
2010-11-18 15:07 · spring · 评论(0)
ControllerClassNameHandlerMapping
ControllerClassNameHandlerMapping控制器是根据控制器短类名和URL请求匹配,如: * WelcomeController:对应/welcome*的Url请求 * UserController:对应/user*的url请求 具体来说是将控制器的Controller后缀移除(IndexController=>Index),再将剩余部分转为小写(index)得到的字符串作为请求URL的配置前缀 配置文件代码如下: # <!-- 根据控制器短类名和URL请求匹配 --> <bean class="org.springframework.web.servlet.mvc.…
2010-11-16 11:22 · spring · 评论(0)
sring WebContentGenerator cache
/* * Copyright 2002-2007 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless require…
2010-11-15 14:37 · spring · 评论(0)
Java Annotation手册
Java Annotation手册 作者:cleverpig(作者的Blog:http://blog.matrix.org.cn/page/cleverpig) 原文:http://www.matrix.org.cn/resource/article/44/44055_Java+Annotation+Reflect.html 关键字:java,annotation,reflect 前言: 在上篇文章《Java Annotation入门》中概要性的介绍了Annotation的定义、使用,范围涵盖较广,但是深度不够。所以作者在《Java Annotation入门》后,继续整理了Annotatio…
2010-11-14 00:00 · java · 评论(0)
MySQL新建用户,删除用户和修改密码
1.新建用户。 //登录MYSQL @>mysql -u root -p @>密码 //创建用户 mysql> insert into mysql.user(Host,User,Password) values("localhost","phplamp",password("1234")); //刷新系统权限表 mysql>flush privileges; 这样就创建了一个名为:phplamp 密码为:1234 的用户。 然后登录一下。 mysql>exit; @>mysql -u phplamp -p @>输入密码 mysql>登录成功 2.为用户授权。 //登录MYSQL(有ROOT权…
2010-11-13 18:10 · mysql · 评论(0)