小小问题

huxinxinxin 2012-04-11 08:13:09
org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 23 in the jsp file: /articleDetail.jsp
The method executeQuery(Statement, String) is undefined for the type DB
20: Connection conn = DB.getconn();
21: String sql = "select * from article where id = " + id;
22: Statement stmt = DB. createStmt(conn);
23: ResultSet rs = DB.executeQuery(stmt, sql);
24: if(rs.next()) {
25: a = new Article();
26: a.initFromRs(rs);
23句找了半天,还找不到那里错了,求解啊。
...全文
86 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
mokson 2012-04-11
  • 打赏
  • 举报
回复
要用英文格式的点,不要用中文的点.
001007009 2012-04-11
  • 打赏
  • 举报
回复
22: Statement stmt = DB. createStmt(conn);

DB. 后面可以空格?

10,606

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 其他
社区管理员
  • 其他
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧