jsp&servelt学习笔记
1.eclipse常用设置:
(1)在windows->perferences->java->Editor->content assist->auto activation设置hovs的延迟时间,也就是自动补全的延迟时间。
(2)在编辑器的空白处右键->perferences可以选择默认文本编码方式。
2.bbs项目学习笔记:
(1)mysql删除命令:delete from article where id=?;
(2) jsp连接数据库代码片段。
1 Class.forName("com.mysql.jdbc.Driver");
2 String url = "jdbc:mysql://localhost/bbs?user=root&password=549325";
3 Connection conn = DriverManager.getConnection(url);
4
5 stmt = conn.createStatement();
6 String sql = "select * from article where pid = 0";
7 rs = stmt.executeQuery(sql);