易截截图软件、单文件、免安装、纯绿色、仅160KB

jsp的小问题,头晕了!!!

<%@ page pageEncoding="GBK"%>
<%@ page import="java.sql.*, com.jun.bbs.*, java.util.*, java.io.*"%>

<%!
private void tree(Set <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 article = new Article();
  article.setId(rs.getInt("id"));
  article.setPid(rs.getInt("pid"));
  article.setRootid(rs.getInt("rootid"));
  article.setTitle(rs.getString("title"));
  article.setLeaf(rs.getInt("leaf") == 0? true:false);
  }
  } catch(SQLExpection e) {
  e.printStackTrace();
}
}
%>

<%
List <Article> articles = new ArrayList <Article>();
Connection conn = DB.getConn();
tree(articles, conn, 0, 0);
DB.close(conn);
%>

写了一半遇到错了,找了半天没找到,各位帮忙看下,在new List是报错,说List不是个类,catch那也报错。。。
lg


List 和 Set 不是一个体系的,不能转换。
改改
private void tree(Collection <Article> articles, Connection conn, int id, int grade)
{{


相关问答:

jsp链接sql2000的疑问?



type Exception report


message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jas ......

jsp页面控制的问题

有几种用户,其权限不同。只有特定权限的用户才能进行相应操作。我想在jsp页面里进行这个设置
<input type="submit" value="修改"/> ,我想让只有特定权限的用户才能按这个按钮,否则报 ......

我想做个jsp聊天室谁那里素材?

急用谢谢大家了 请速回帖子


www.sharejs.com
这是个javascript 网站
去里面找找 js 特效,css样式,都很不错的。
用在自己的jsp上 很帅的。
我自己开发的几个jsp页面都用了上面的特效很好,

接分,赞! ......

jsp网站如何发布到网上

我刚做好一个jsp的购物商城,可我不会怎么发布到网上!有谁能帮帮我
可以自己租用一台服务器配置,关于上传的话,就是用上传软件,把你的程序传到服务器上。


mark

打个war包放上去就行了

咋听你们说的这 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号