当前位置: 代码迷 >> Java Web开发 >> Unable to compile class for JSP找不出异常
  详细解决方案

Unable to compile class for JSP找不出异常

热度:2366   发布时间:2013-02-25 21:12:46.0
Unable to compile class for JSP找不出错误
显示是ClassNotFoundException: org.apache.jsp.BBS.WebRoot.article_jsp
Unable to compile class for JSP: 
的错误 可是就是不知道哪错了 找不出来!!


<%@ page pageEncoding="Gb18030"%>
<%@ page import="java.sql.*, org.hjj.bbs.*, java.util.*"%>

<%!
private void tree(List<Article> articles , Connection conn , int id , int grade){
  String sql = "select * from article where pid =" + id;
  Statement stmt = DB.createStmt(conn);
  ResultSet rs = DB.executeQuery(stmt , sql);
  try{
  while(rs.next()){
  Article a = new Article();
  a.initFromRs(rs);
  a.setGrade(grade);
articles.add(a);
if(!a.isLeaf()){
tree(articles , conn , a.getId() , grade+1);
}
  }
  }catch(SQLException e){
  e.printStackTrace();
  }
  finally {
DB.close(rs);
DB.close(stmt);
  } 
}
%>

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

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>论坛: Java语言*初级版</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="images/style.css">
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td width="1%">
<a href="http://bbs.chinajavaworld.com/index.jspa">;ti<img
src="images/header-left.gif" alt="JAVA中文世界论坛|JAVA开发者论坛"
border="0" height="38" width="199"> </a>
</td>
<td width="98%">
<img src="images/header-stretch.gif" alt="" border="0" height="38"
width="100%">
</td>
<td width="1%">
<img src="images/header-right.gif" alt="" border="0" height="38"
width="5">
</td>
</tr>
</tbody>
</table>
<br>
<p class="jive-page-title">
论坛: Java语言*初级版
</p>
<p class="jive-description">
&nbsp;
</p>
<link rel="alternate" type="application/rss+xml" title="RSS"
href="http://bbs.chinajavaworld.com/rss/rssmessages.jspa?forumID=20">
<script language="JavaScript" type="text/javascript"
src="images/common.js"></script>
<div id="jive-forumpage">
<div class="jive-buttons">
<table summary="Buttons" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="jive-icon">
<a
href="http://bbs.chinajavaworld.com/post%21default.jspa?forumID=20"><img
src="images/post-16x16.gif" alt="发表新主题" border="0" height="16"
width="16"> </a>
</td>
<td class="jive-icon-label">
<a id="jive-post-thread"
href="http://bbs.chinajavaworld.com/post%21default.jspa?forumID=20">发表新主题</a>
  相关解决方案