错误出来了!!(急)

HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

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

exception

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
[javac] Compiling 1 source file

D:\Tomcat 5.0\webapps\dangshanweb\work\org\apache\jsp\myweb\xtgl\branchlist_jsp.java:43: illegal start of expression
private static java.util.Vector _jspx_dependants;
^
D:\Tomcat 5.0\webapps\dangshanweb\work\org\apache\jsp\myweb\xtgl\branchlist_jsp.java:45: illegal start of expression
static {
^
D:\Tomcat 5.0\webapps\dangshanweb\work\org\apache\jsp\myweb\xtgl\branchlist_jsp.java:278: ';' expected
}
^
D:\Tomcat 5.0\webapps\dangshanweb\work\org\apache\jsp\myweb\xtgl\branchlist_jsp.java:20: org.apache.jsp.myweb.xtgl.branchlist_jsp should be declared abstract; it does not define getDependants() in org.apache.jsp.myweb.xtgl.branchlist_jsp
public final class branchlist_jsp extends org.apache.jasper.runtime.HttpJspBase
^
4 errors

org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:127)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:415)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:458)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:553)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

note The full stack trace of the root cause is available in the Tomcat logs.

--------------------------------------------------------------------------------

Apache Tomcat/5.0.19
------------------------------------------------------------------------------------------
附代码:
<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%>
<%@ page import="com.ahsw.myweb.*"%>
<%@ page import="java.util.*"%>
<%@ page import="java.lang.*"%>
<%@ page import="javax.servlet.*"%>
<%@ page import="javax.servlet.jsp.*"%>
<%@ page import="javax.servlet.http.*"%>
<%@ page import="java.io.*"%>
<%@ page import="java.nio.*"%>
<%@ page import="java.nio.channels.*"%>
<%@ page import="java.lang.Object.*"%>
<%@ page import="com.ahsw.myweb.*"%>
<%@ page import="java.sql.*"%>
<jsp:useBean id="db" scope="session" class="com.ahsw.myweb.DBConnect" />
<%@ include file="../chkSess.jsp"%>
<html>
<head>
<title><%=Config.getTitleName()%></title>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
<meta http-equiv="expires" content="wed, 26 Feb 1997 08:21:57 GMT">
<link rel="stylesheet" href="../css/main.css" type="text/css">
<script language="JavaScript">
var o=0;
function numcheck(form) { //v2.0
for(var i=0;i<form.elements.length;i++)
{
var e=form.elements[i];
if(e.checked)
o=o+1;
}
if (o==1){

parent.a3.disabled=false;
parent.a2.disabled=false;
parent.a1.disabled=false;
}
else if(o==0){
parent.a1.disabled=true;
parent.a2.disabled=true;
parent.a3.disabled=true;
}else{

parent.a1.disabled=true;
parent.a2.disabled=true;
parent.a3.disabled=false;
}
o=0;
}

</script>

<SCRIPT LANGUAGE="JavaScript">
<!--
function ShowMenu(MenuID)
{
if(MenuID.style.display=="none")
{
MenuID.style.display="";
}
else
{
MenuID.style.display="none";
}
}
//-->
</SCRIPT>
</head>
<body bgcolor="#FFFFFF" text="#000000" style="margin:0">
<table border="0" cellspacing="1" cellpadding="3"
class="tablebg">
<tr>
<td class="tdbg2">
<form name="form1" method="post" action="">
<%!//ShowTreeMenu
public void ShowTreeMenu(DBConnect dbc,ResultSet rs,int layer,int Id) throws Exception{
int GLOBALSID = 1;
layer=2;
int numrows = 0;
int[] menu = new int[]{};

String sql = "select * from web_branch where Pid=0";
try{
dbc = new DBConnect(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
rs = dbc.executeQuery(sql);
while(rs.next()){
menu[numrows] = rs.getInt("Pid");
numrows++;
}
}catch(SQLException e){
System.out.print(e);
}
%>
<table cellpadding='0' cellspacing='0' border='0'>
<%
for(int rows=0;rows<=numrows;rows++){
String sql_sub = "select * from web_branch where Pid='"+menu[Id]+"'";
try{
ResultSet rs_sub = dbc.executeQuery(sql_sub);
%>
<tr>
<%
if(rs_sub.next())
{
%>
<td width='40'><input type='checkbox' name='bra[]'
value='<%=menu[Id]%>' onclick='numcheck(this.form)'><img
src='../images/tree_folder.gif' border='0'></td>
<td style='CURSOR:hand'
onClick='javascript:ShowMenu(Menu"<%=GLOBALSID%>");'><%
}
else
{
%>
<td width='40'><input type='checkbox' name='bra[]'
value='<%=menu[Id]%>' onclick='numcheck(this.form)'><img
src='../images/tree_file.gif' border='0'></td>
<td style='CURSOR:hand'><%
}
%> <a href='#' onclick=\
"parent.right.location='branch_display.jsp?ID=<%=menu[Id]%>'\"><%=rs.getString("Art") %></a>
</td>
</tr>
<%

while(rs_sub.next())
{
GLOBALSID++;

%>
<tr id=Menu "<%=GLOBALSID%>" style='display:show'>
<td width='20'> </td>
<td><%

layer++;

ShowTreeMenu(dbc,rs_sub,layer);

layer--;
%></td>
</tr>
<%
}

}catch(SQLException e){
System.out.print(e);
}
}
%>
</table>
<%
}
%></form>
</td>
</tr>
</table>
</body>
</html>
[7526 byte] By [jenrry2000-生鱼片] at [2008-4-24]
# 1
这么看太费事了
你去你部署的目录下有个work的目录里找branchlist_jsp.java这个文件
按照行号去检查!
alex9521-断言 at 2007-10-14 > top of Msdn China Tech,Java,Web 开发...
# 2
没看懂你的代码

声明的方法哪里调用?
kevinliuu at 2007-10-14 > top of Msdn China Tech,Java,Web 开发...
# 3
看不太董错误的意思!
jenrry2000-生鱼片 at 2007-10-14 > top of Msdn China Tech,Java,Web 开发...
# 4
错误出来了自己学会解决呀!不要一贴就不管是了.错误信息里写的很明白了:
D:\Tomcat 5.0\webapps\dangshanweb\work\org\apache\jsp\myweb\xtgl\branchlist_jsp.java:43: illegal start of expression
private static java.util.Vector _jspx_dependants;
^
D:\Tomcat 5.0\webapps\dangshanweb\work\org\apache\jsp\myweb\xtgl\branchlist_jsp.java:45: illegal start of expression
static {
^
D:\Tomcat 5.0\webapps\dangshanweb\work\org\apache\jsp\myweb\xtgl\branchlist_jsp.java:278: ';' expected
}
^
一找就能找到.
weiba9412 at 2007-10-14 > top of Msdn China Tech,Java,Web 开发...