把Properties properties = new Properties();
properties.put(Context.PROVIDER_URL, "t3://127.0.0.1:8080");注释掉看看,用系统默认的properties
然后用InitialContext ctx=new InitialContext( );
当然楼上说的用ds=(DataSource)ctx.lookup("java:comp/env/jdbc/myTest");不能忘掉哦
properties.put(Context.PROVIDER_URL, "t3://127.0.0.1:8080");注释掉看看,用系统默认的properties
然后用InitialContext ctx=new InitialContext( );
当然楼上说的用ds=(DataSource)ctx.lookup("java:comp/env/jdbc/myTest");不能忘掉哦
错误;
org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver
http://community.csdn.net/Expert/topic/3091/3091415.xml?temp=.2476923
把JSQLConnect.jar考到D:\Tomcat 5.0\common\lib