1.连接数据库
//1.装载数据库驱动
//2.连接数据库
//3.执行数据库操作
//4.关闭数据库
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn=DriverManager.getConnection();
Statement sm=conn.createStatement();
ResultSet rs=sm.executeQuery("select * from");
While(rs.next()){
out.print(rs.getString("dept_name"));
}
if(rs!==null){
rs.close();
}
......