- 浏览: 197338 次
- 性别:
- 来自: 杭州
最新评论
-
chenhaifeng5:
能详细讲一下么,偶公司做的是反洗钱系统的,是把公司已经 ...
银行IT系统项目 -
jspc:
ok
只不过的是放到相应的plugins的目录中 ok 重启 ...
安装Eclipse的Tomcat插件 -
click_guobin:
反驳你的用户名 幸好你注册了 不然我也看不到想要的,呵呵 ...
Decode -
本来不想注册:
return mapping.findForward(&quo ...
使用poi 从数据库导出生成Excel文件 -
2022228:
书上说的:
1.2版本之前只有启动类装载器和用户自定义的
1. ...
类装载器的体系结构
文章列表
有时候在JSP里,我们会使用很多相同name的field,比如像这样:
<tr>
<td><input type="checkbox" name="view1"
value="a" /> xxd1</td>
<td><input type="checkbox" name="view1"
value="b" /> xxd2 ...
最近做一个月参与了公司两个小项目,毕业快两年,参与项目还真少!所以呢,本人掌握的知识还是很有限,完成了某些功能,需要放到这里,供日后参考!
如何从数据库中导出数据生成Excel文档
首先第一步,我参考了POI 这个开源项目,从其官方网站download需要用到的jar包。 http://poi.apache.org/
然后项目采用的是Struts1.* 的版本,ok,那么放一些关键代码上来:
Action中的代码:
public ActionForward doExportExcel(ActionMapping mapping, ActionForm form,
Http ...
//declaring the constructor
function ArrayMaker(arg1, arg2) {
this.someProperty = 'whatever';
this.theArray = [ this, arg1, arg2 ];
}
// declaring instance methods
ArrayMaker.prototype = {
someMethod: function () {
alert( 'someMethod called');
...
If a method is overridden but you use a polymorphic (supertype)
reference to refer to the subtype object with the overriding method, the compiler
assumes you’re calling the supertype version of the method. If the supertype version
declares a checked exception, but the overriding subtype method does n ...
public class Test {
public static void main(String[] args){
int i = 0;
try{
for(int k = 0; k<10; k++){
i = i/k++;
System.out.println(k);
}
}catch(RuntimeException e){
System.out.println("RuntimeException caught");
}catch(ArithmeticException ex){
System ...
在实际项目中,一般会采用读取配置文件的方式进行log控制,最常用的是log4j.properties
第一步: 新建一个java工程,名字就叫: logExample1
第二步: 在src目录下新建log4j.properties文件
代码如下:
#define the root logger
#appender's name is file and the level is INFO
log4j.rootLogger = INFO, file
log4j.appender.file = org.apache.log4j.RollingFileAppender
#the ...
- 2009-08-18 20:40
- 浏览 1329
- 评论(0)
如果看了前面5部分,还没有建立起log4j的整个框架的概念,那么请参考这个链接: http://www.laliluna.de/log4j-tutorial.html
接下来我将写上自己的一个例子
- 2009-08-18 19:54
- 浏览 728
- 评论(0)
The log4j environment is fully configurable programmatically. However, it is far more flexible to configure log4j using configuration files. Currently, configuration files can be written in XML or in Java properties (key=value) format.
来一个例子:import com.foo.Bar;
// Import log4j classes.
import ...
- 2009-08-18 16:55
- 浏览 2178
- 评论(0)
Layout of the log file
More often than not, users wish to customize not only the output destination but also the output format. This is accomplished by associating a layout with an appender. The layout is responsible for formatting the logging request according to the user's wishes, whereas an append ...
- 2009-08-18 16:09
- 浏览 3127
- 评论(0)
Q: 什么是Appender?
A: Log4j allows logging requests to print to multiple destinations. In log4j speak, an output destination is called an appender.
Q: 目前有几多类型的Appender?
A: Currently, appenders exist for the console, files, GUI components, remote socket servers, JMS, NT Event Loggers, and remote UNIX ...
- 2009-08-18 13:15
- 浏览 1302
- 评论(0)
紧紧接着log4j 介绍(1)--Logger篇
If a given logger is not assigned a level, then it inherits one from its closest ancestor with an assigned level. More formally:
Level Inheritance
The inherited level for a given logger C, is equal to the first non-null level in the logger hierarchy, starting at C and proce ...
- 2009-08-18 12:05
- 浏览 1034
- 评论(0)
Loggers, Appenders and Layouts
Log4j has three main components: loggers, appenders and layouts. These three types of components work together to enable developers to log messages according to message type and level, and to control at runtime how these messages are formatted and where they are report ...
- 2009-08-18 11:53
- 浏览 840
- 评论(0)
1,Char, varchar and varchar2 区别?
2,Outter join & Inner join 区别?
3,什么是Cursor, 如何使用?
4,When/where does a Transaction begin?
5,What is a Foreign key?
6,Can we Rollback changes made by a 'Truncate'?
7,Difference between Function & Procedure?
8,What is a Trigger, Two Trigger, same conditio ...
Ampersands (&'s) in URLs
Another common error occurs when including a URL which contains an ampersand ("&"):
<!-- This is invalid! --> <a href="foo.cgi?chapter=1§ion=2©=3&lang=en">...</a>
This example generates an error for "unk ...
翻阅一些资料后:
段落1:
为什么要重写hashCode()方法呢,主要是为了return 我们想要的hashCode值,这些值是整型。
首先看看原始的Object类中的hashCode():
public native int hashCode();
看看对这个方法的描述:
As much as is reasonably practical, ...
- 2009-07-23 23:01
- 浏览 1327
- 评论(0)