筑论坛的代码提示老是出错,求高手解答

建论坛的代码提示老是出错,求高手解答
<%@ page pageEncoding="GB18030"%>
<%@ page import="java.sql.* ,java.io.*,com.bjsxt.bbs.*,java.util.*"%>
<%!
    private void tree(Set<Article> articles,Connection conn,int id,int grade){
       String sql="select * from article where pid"+id;
       Statement stat=DB.createstatement(conn);
       ResultSet res=DB.excuteQuery(stat,sql);
       try{
            while(res.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.setPdate=(rs.getTimestamp("pdate"));
               a.setGrade=(grade));
               a.setIsleaf=(rs.getInt("isleaf")==0?true:false);
               articles.add(a);
               for(!a.setIsleaf()){
                 tree(articles,conn, a.getId(),grade+1);
               }
               }
               } catch(SQLException e){
                  e.printStackTrace();
 
                }
           }
           
 %>
 <%
 Set<Article> articles=new HashSet<Article>();
 Connection conn=DB.getconn();
 tree(articles,conn,0,0);
 DB.close(conn);
 %>
<%
                     for(Iterator<Article> it=articles.iterator();it.hasNext();){
                      Article a=it.next();
                 %>
<%
}
%>
找了好半天,还是不知道哪里错了,急求高手解答
------解决方案--------------------
没有错误提示?
------解决方案--------------------
我看了一下错误有很多,重构系统可以先看一下原来的代码。
1,ResultSet res=DB.excuteQuery(stat,sql);这里是res但是rs.getInt("id");这里却用rs取值。
2,a.setGrade=(grade));这句多出一个')';