Java连接数据库代码
Java连接数据库代码实现代码, 代码片段: public MyTask(ServletContext context) { this.mContext = context; Properties prop = new Properties(); InputStream in = null; try { in = MyTask.class.getClassLoader().getResourceAsStream("db.properties"); prop.load(in