- 浏览: 417579 次
- 性别:
- 来自: 北京
最新评论
-
burningblood:
最近也遇到了这个细节问题。我用的是4,里面没有 get.rel ...
httpclient的并发连接问题 -
greatwqs:
使用HttpURLConnection注意设置超时 -
qinweilh:
...
tomcat报错:standardServer.await: create[8005]: -
jayyunfei:
还是不很明白
JPA entityManager的管理 -
a418040445:
...
Calendar
文章列表
ResourceBundle加载文件的顺序
- 博客分类:
- java
If a ResourceBundle
class for the specified Locale
does not exist, getBundle
tries to find the closest match. For example, if ButtonLabel_fr_CA_UNIX
is the desired class and the default Locale
is en_US
, getBundle
will look for classes in the following order:
ButtonLabel_fr_CA_UNIX
B ...
use x-forwarded-for
- 博客分类:
- web
X-Forwarded-For
(XFF
)是用来识别通过HTTP
代理
或负载均衡
方式连接到Web服务器
的客户端最原始的IP地址
的HTTP请求头字段。 Squid
缓存代理服务器的开发人员最早引入了这一HTTP头字段,并由IETF
在Forwarded-For HTTP头字段标准化草 ...
配置ssh无需密码直接登录
- 博客分类:
- linux
Your aim
You want to use Linux and OpenSSH to automize your tasks. Therefore
you need an automatic
login from host A / user a to Host B / user b.
You don't want to enter any passwords, because you want to call ssh
from a within a shell script.
How to do it
First log in on A as user a and ge ...
web环境中配置log4j记录用户跟踪信息
- 博客分类:
- web
http://www.ibm.com/developerworks/cn/web/wa-lo-usertrack/index.html
apache日志配置
- 博客分类:
- web
有时候我们需要定制Apache默认日志的格式和内容,比如增加或减少日志所记录的信息、改变默认日志文件的格式等。本文介绍可以用日志记录的所有信息,以及如何设置Apache使其记录这些信息。
一、定义日志格式(4月3 ...
这几天碰到一个奇怪的问题:网站上登录窗口是一个overlay的弹出窗口,在某些很老的机器上面使用ie6 & ie7访问的时候,登录窗口上面会有一个loading的图片始终不消失,同时这个窗口也无法点击进行任何操作。
这个弹出窗口是通过jQuery colorbox来实现的。由于js在ie6, ie7上面的js解析引擎本身速度就慢,在老机器本身cpu速度不够的情况下,猜测事件处理顺序上出了问题或者发生冲突。
那么我就把精力放到网页中js上面。首先屏蔽除了colorbox所有部分的js,结果发现colorbox运行正常。这说明是colorbox跟其他js部分产生了冲突。
...
经过紧张的开发过程,新的网站总算上线了。但是使用流量分析工具进行查看,发现性能非常不好。一个页面全部下载下来,比老版网站多了一倍的时间!
分析工具给出的解释是这样的:
HTTP Persisitent Connections appear to be disabled for the following hosts: xxx
This increases network overhead, causing delays in page loads, and greater stress on the servers.
通过查询,原来这是HTTP1.1的特性,可以配置是否重复使 ...
How to rotate tomcat logs
- 博客分类:
- web
If catalina.out becomes 2GB in size, tomcat crashes and fails to
start without any error message. To avoid this scenario you should
rotate catalina.out frequently. This article describes how to setup auto
rotation of catalina.out on a linux/unix machine.
How to automatically rotate catalina.ou ...
win7上apache+php环境搭建
- 博客分类:
- web
http://www.leapsoul.cn/?p=695
需要注意的几点:
1. php分为vc6和vc9两种编译模式,如果跟apache配合,一定使用cv6的版本。 里面又分为thread safe和non-thread safe版本,应当选择thread safe版本,否则运行会报错。
2. 如果apache启动失败,可以通过命令行运行httpd.exe -e debug来查看具体的原因。
3. PHP 5+
MySQL is no longer enabled by default, so the php_mysql.dll
DLL must be ena ...
The Nature of Exceptions
Broadly speaking, there are three different situations that cause exceptions to be thrown:
Exceptions due to programming errors
: In this category, exceptions are generated due to programming errors (e.g., NullPointerException and IllegalArgumentException). The clien ...
eucalyptus vm访问的问题
- 博客分类:
- 云计算
搭建好eucalyptus环境以后,需要从外部访问vm instance. 开始通过ping vm public ip,结果ping不通。以为是网络问题,需要cc机器做路由转发。试验了很多次,还是ping不通~~
后来发现,其实已经可以通过ssh登录了!只是vm没有开通ping的功能。
通过网上查阅资料,原来eucalyptus有安全组的配置:
euca-describe-groups
euca-revoke -P icmp -s a.b.c.d default
通过上面命令,可以添加相应的网络通信协议,之后就可以ping通了!
http://cssoss.wor ...
#/bin/sh
echo "running cloud-init..."
HOSTNAME=`hostname`
IP_TAG=`echo $HOSTNAME | awk -F "-" '{print $1}'`
if [ IP_TAG != "ip" ]
then
echo "not a eucalyptus image, exit"
exit 1;
fi
IP=`echo $HOSTNAME | awk -F "-" '{p ...
Failed to operate on mapred.system.dir (hdfs://namenode/mapred/system) because of permissions.
2011-09-06 09:19:25,415 WARN org.apache.hadoop.mapred.JobTracker: This directory should be owned by the user 'mapred'
2011-09-06 09:19:25,416 WARN org.apache.hadoop.mapred.JobTracker: Bailing out .. ...
datanode起不来,日志为:
STARTUP_MSG: Starting DataNode
STARTUP_MSG: host = ip-172-19-1-3/172.19.1.3
STARTUP_MSG: args = []
STARTUP_MSG: version = 0.20.2-cdh3u0
STARTUP_MSG: build = -r 81256ad0f2e4ab2bd34b04f53d25a6c23686dd14; compiled by 'root' on Sat Mar 26 00:12:30 UTC 2011
************** ...
1. install expect module.
2. write logcollect.exp file
set USERNAME "fishyych"
set CMD_PROMPT "]*"
set REMOTE_SERVER [lindex $argv 0]
set TARGET_FILENAME [lindex $argv 2]
set TARGET_FOLDER [lindex $argv 1]
set timeout 30
spawn ssh $USERNAME@jumpserver
expect $CMD_PR ...