新手跟着视频学的,运行后什么也不显示
index.jsp
<%!
private void tree(List<Article> articles,Connection conn,int id,int grade){
String sql = "select*from article where pid = "+ id;
Statement stmt = DB.getStmt(conn);
ResultSet rs = DB.executeQuery(stmt,sql);
try{
while(rs.next()){
 Article a = new Article();
a.setId(rs.getInt("id"));
a.setPid(rs.getInt("pid"));
a.setRootId(rs.getInt("rootid"));
a.setTitle(rs.getString("title"));
a.setLeaf(rs.getInt("isLeaf") == 0?true : false);
a.setPdate(rs.getDate("pdate"));
a.setGrade(grade);
articles.add(a);
if(!a.isLeaf()){
tree(articles,conn,a.getId(),grade + 1);
}
} }catch(SQLException e){
e.printStackTrace();
}
}
%>
<%
         List<Article> articles = new ArrayList<Article>();
        Connection conn = DB.getConn();
         tree(articles,conn,0,0);
         DB.close(conn);
%>  <body>
    
<% for(Iterator<Article> it = articles.iterator(); it.hasNext(); ) {
                 Article a = it.next();
%>
  <tr>This is my JSP page.</tr>
<%
} %>
Article.java