2008-04-09

线程 内部类

关键字: 线程 内部类
一个内部类的用法。 Inc inc = tt.new Inc(); Dec dec = tt.new Dec(); package spooner; public class ThreadTest1 { class Inc implements Runnable { public void run() { for (int i = 0; i < 100; i++) { inc(); } } } class Dec implements Runnable { public void run() { for (int ...
2008-04-01

(收藏 )cglib 文章

关键字: cglib
http://elathen.itpub.net/post/32506/294971 http://elathen.itpub.net/post/32506/294972 http://elathen.itpub.net/post/32506/294973 http://www.ociweb.com/jnb/jnbNov2005.html cglib 代理的是类的实例, 而非类.
2008-03-12

Eclipse 常用插件

关键字: eclipse 常用插件
findbugs http://findbugs.cs.umd.edu/eclipse/ clover http://update.atlassian.com/eclipse/clover checkstyle http://eclipse-cs.sourceforge.net/update
2007-05-16

JSP取得http的header

关键字: jsp header
<% java.util.Enumeration names = request.getHeaderNames(); while(names.hasMoreElements()){ String name = (String) names.nextElement(); out.println(name + ":" + request.getHeader(name) + "<BR>"); } %>
2007-02-02

servlet中获得tomcat项目相对路径的绝对路径

关键字: servlet tomcat 项目路径
public class CreateXmlAction extends HttpServlet { private ServletConfig config; public void init(ServletConfig config) throws ServletException { this.config = config; } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, ...
2007-02-02

得到的类的当前目录

关键字: java
public String getClassPath() { String strClassName = getClass().getName(); String strPackageName = ""; if (getClass().getPackage() != null) { strPackageName = getClass().getPackage().getName(); } String strClassFileName = ""; if (!"".equals(strPackageName)) { strClassF ...
2007-01-30

通过CSS将过多的文字用省略号表示

关键字: CSS 省略号
CSS中的textOverflow属性可以将过多的文字用省略号进行表示,语法如下: html 代码 <div style="text-overflow:ellipsis;overflow:hidden;width:50px">123456789</div> <br>   <div style="text-overflow:ellipsis;overflow:hidden;width:110px">12345 ...