
Java笔记
hufengfeng
这个作者很懒,什么都没留下…
展开
-
Cannot create JDBC driver of class 'com.mysql.jdbc
我在ApplicationContext.xml 中配置数据源时候 出现了如下错误: 严重: Cannot create JDBC driver of class 'com.mysql.jdbc.Driver' for connect URL ' jdbc:mysql://localhost:3306/demo 刚开始以为class 写错了 com.mysq...2009-02-27 13:42:47 · 1463 阅读 · 0 评论 -
struts2 + spring2+hibernate3+sitemesh+myeclipse
还有个乱码问题没有解决!原创 2009-02-27 16:32:27 · 86 阅读 · 0 评论 -
getHibernateTemplate() 缓存
我的问题是,数据插入了,而且在数据库中也能查到,过一段时间又没有了, 在hibernate 配置文件上 true2009-03-16 10:03:41 · 265 阅读 · 0 评论 -
不能访问windows installer服务
开始——运行对话框中输入 (不是在cmd命令行) 1 、先用msiexec /unregserver 停掉windows installer服务。 2 、msiexec.exe /regserver 启用服务2010-03-31 21:29:00 · 136 阅读 · 0 评论 -
struts2 lebel标签失效问题
本来引用struts2 标签,就可以自动换行,可以我的jsp页面怎么也不换行,而且 leber的name在页面上也不显示 搞了好久,最后很郁闷,竟然是struts.properties文件内struts.ui.theme=simple 应改为struts.ui.theme=xhtml...2009-07-22 11:43:01 · 278 阅读 · 0 评论 -
java递归实现从1加到100
[code="java"] public static void main(String[] args) { System.out.println(diGui(100)); } public static int diGui(int n){ int result; if(n == 1){ return 1; } else{ result =...原创 2009-09-02 18:59:40 · 881 阅读 · 0 评论 -
单列设计模式的两种写法
[code="java"] public class Singleton { private static Singleton instance = null; private Singleton(){} public static synchronized Singleton getInstance(){ if(instance == null){ instance ...原创 2009-09-03 11:16:56 · 129 阅读 · 0 评论 -
笔试中遇到的
[code="java"] public class MyTest { public static void main(String[] args) { Test t = new Test(); List list = new ArrayList(); for (int i = 0; i < 5; i++) { t.name = String.valueOf(i);...原创 2009-09-04 14:21:19 · 115 阅读 · 0 评论 -
转java中判断字符串是否为数字的三种方法
java中判断字符串是否为数字的三种方法 1.用JAVA自带的函数 [code="java"]public static boolean isNumeric(String str){ for (int i = str.length();--i>=0;){ if (!Character.isDigit(str.charAt(i))){ return false; ...原创 2012-04-23 17:08:02 · 81 阅读 · 0 评论