随笔分类 -  00.Java & j2ee

上一页 1 ··· 4 5 6 7 8
摘要:Expression-LanguageImplicit Object DescriptionapplicationScopeThis is a Map that contains all application-scoped variables. The Map is keyed on the name of the variable. cookieThis is a Map that maps... 阅读全文
posted @ 2010-11-10 23:10 庚武 阅读(205) 评论(0) 推荐(0) 编辑
摘要:一.request对象:该对象封装了用户提交的信息,通过调用该对象相应的方法可以获取封装的信息,即使用该对象可以获取用户提交信息。它是HttpServletRequest的实例。JSP下面介绍request的常用方法:1,getParameter();使用如下 String str=request.getParameter();2,setAttribute();和getAttribute();re... 阅读全文
posted @ 2010-11-08 09:45 庚武 阅读(484) 评论(0) 推荐(1) 编辑
摘要:什么是ThreadLocal?顾名思义它是local variable(线程局部变量)。它的功用非常简单,就是为每一个使用该变量的线程都提供一个变量值的副本,是每一个线程都可以独立地改变自己的副本,而不会和其它线程的副本冲突。从线程的角度看,就好像每一个线程都完全拥有该变量。使用场景To keep state with a thread (user-id, transaction-id, logg... 阅读全文
posted @ 2010-09-21 00:44 庚武 阅读(10590) 评论(0) 推荐(0) 编辑
摘要:在MyEclipse中启动assert(断言)依次进入在MyEclipse8的菜单项Window -> Preferences -> Java -> Compiler -> Compliance and Classfiles断言在java的JDK1.4版本中添加进来,JVM默认assertion的功能是关闭的.这个设置告诉编译器识别和允许断言语句,但是还没有开启断言。接下来... 阅读全文
posted @ 2010-09-05 13:34 庚武 阅读(871) 评论(0) 推荐(0) 编辑
摘要:java 的enum也是个类。[代码]e.g.2:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--publicenumActionAbstract{TURN_LEFT{publicStringGetDesc(){return"left";}},TU... 阅读全文
posted @ 2010-09-03 17:36 庚武 阅读(380) 评论(0) 推荐(0) 编辑

上一页 1 ··· 4 5 6 7 8