`
本来不想注册
  • 浏览: 197338 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论
文章列表
有时候在JSP里,我们会使用很多相同name的field,比如像这样: <tr> <td><input type="checkbox" name="view1" value="a" />&nbsp;xxd1</td> <td><input type="checkbox" name="view1" value="b" />&nbsp;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 ...
如果看了前面5部分,还没有建立起log4j的整个框架的概念,那么请参考这个链接: http://www.laliluna.de/log4j-tutorial.html 接下来我将写上自己的一个例子
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 ...
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 ...
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 ...
紧紧接着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 ...
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 ...
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&section=2&copy=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, ...
Global site tag (gtag.js) - Google Analytics