请帮我分析一下这个错误信息

Realot_11 2002-03-08 05:02:18
Error: 500 Location: /\CSTreeBean-0.3\example\TreeFrames.jspInternal Servlet Error:org.apache.jasper.JasperException: Unable to compile class for JSPD:\QB_webroot\work\localhost_8080\_0002f_0002fCSTreeBean_0002d_00030_0002e_00033_0002fexample_0002fTreeFrames_0002ejspTreeFrames_jsp_0.java:1: Identifier expected.
package .CSTreeBean_0002d_00030_0005f_00033.example;
^
D:\QB_webroot\work\localhost_8080\_0002f_0002fCSTreeBean_0002d_00030_0002e_00033_0002fexample_0002fTreeFrames_0002ejspTreeFrames_jsp_0.java:17: Superclass HttpJspBase of class _0002f_0002fCSTreeBean_0002d_00030_0002e_00033_0002fexample_0002fTreeFrames_0002ejspTreeFrames_jsp_0 not found.
public class _0002f_0002fCSTreeBean_0002d_00030_0002e_00033_0002fexample_0002fTreeFrames_0002ejspTreeFrames_jsp_0 extends HttpJspBase {
^
2 errors

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:254)
at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462)
at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:152)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:164)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)


这是什么错误????
盼高手解答。
...全文
28 点赞 收藏 14
写回复
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
Realot_11 2002-03-17
谢谢你Tomcat4(Tom)
我现在已经采用另一种方式来生成树了。
回复
Tomcat4 2002-03-13
调用.../treeShow.jsp?reload=true,页面自动更新,重新读取数据库的内容!
回复
Tomcat4 2002-03-13
我没研究这个Bean的结构,不过你可以通过页面来增加、修改数据库,从而得到
动态改变树的目的!
回复
Tomcat4 2002-03-11
我的menuTree.sql文件-sql-server
if exists (select * from sysobjects where id = object_id(N'[dbo].[menuTree]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[menuTree]
GO

CREATE TABLE [dbo].[menuTree] (
[level1] [nvarchar] (50) NOT NULL ,
[level1url] [nvarchar] (50) NULL ,
[level2] [nvarchar] (50) NULL ,
[level2url] [nvarchar] (50) NULL ,
[level3] [nvarchar] (50) NULL ,
[level3url] [nvarchar] (50) NULL
) ON [PRIMARY]
GO

回复
Tomcat4 2002-03-11
你的servlet的包怎么那么长,我是在JSP页面中调用这个bean的:
其参数设置你可以根据你的具体情况参考它的example来修改。
至于如何在servlet中使用,你可以参考这个jsp文件来修改。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">

<HTML>
<HEAD>
<META name="GENERATOR" content="IBM WebSphere Page Designer V3.0 for Windows">
<TITLE>Tree Pane</TITLE>
</HEAD>
<%//@ include file="userinfo/login.jsp" %>
<%@ page contentType="text/html;charset=gb2312" %>
<jsp:useBean id="tree" scope="request" class="newTree.CSTreeBean" />
<jsp:setProperty name="tree" property="jdbcDriver" value="com.ashna.jturbo.driver.Driver" />
<jsp:setProperty name="tree" property="jdbcURL" value="jdbc:JTurbo://localhost:1433/xuefeng/sql70=true" />
<jsp:setProperty name="tree" property="jdbcUser" value="sa" />
<jsp:setProperty name="tree" property="jdbcPassword" value="" />

<jsp:setProperty name="tree" property="tableName" value="menuTree" />
<jsp:setProperty name="tree" property="labelCols" value="level1,level2,level3" />
<jsp:setProperty name="tree" property="urlCols" value="level1url,level2url,level3url" />

<jsp:setProperty name="tree" property="treePage" value="left.jsp" />
<jsp:setProperty name="tree" property="leafTarget" value="right" />

<jsp:setProperty name="tree" property="*" />

<script>
function go_register()
{
self.location="register.jsp";
}
</script>

<style type="text/css">

@import "index2.css";
</style>
<BODY vlink="#0000ff" background="/images/backgrnd.gif" >
<center><img src="/images/login_user.gif" width="90%" height=25 alt="用户登陆"></center>
<TABLE>
<TBODY>
<TR>
<TD>
<table border="1" cellpadding="0" cellspacing="0" bordercolordark="#88a6dd" bordercolorlight="#88a6dd" align="center" width="95%">
<tr>
<td bgcolor=#88a6dd>登<br><br>陆</td>
<td><table bgcolor="lightyellow" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#88a6dd" align="center" colspan="2">用 户</td>
</tr>
<tr><td align="center" width="90%" nowrap>
<form action="userinfo/take_login.jsp" target=right>
用户:<input name=user size=8><br>
密码:<input name=pswd type=password size=8><br>
<input type="submit" name=submit value=登陆>
<!--<input type="button" name=reset value=注册 onclick="go_register()" taget=main>-->
<input type="reset" name=reset value=重置 >
</form>
</td><td align="right" width="10%"><a href="userinfo/register.jsp" target="right">新用户注册</a></td></table>
</td></tr></table>
</table>
</TD>
</TR>
<TR>
<TD><%= tree.renderHTML() %></TD>
</TR>

</TBODY>
</TABLE><br>
</BODY>
</HTML>
回复
Realot_11 2002-03-11
Tomcat4 我们一起试试好吗??

回复
Realot_11 2002-03-11
因为JavaBean中系统编译一次后,便一直运行,如果数据库中数据更改,也不会从新调入数据。

在这个JavaBean中所用到的数值是两个数组,我在想是否可以通过在页面中将数组赋值,在传递给JavaBean。这样可以实现动态生成树。
问题是:
1.如何实现给JavaBean赋值(要传给JavaBean的数值为数组)?
2.如何知道层次关系(数组中)。
回复
Realot_11 2002-03-11
tomcat4
请帮忙分析分析。
回复
Tomcat4 2002-03-11
对动态性能不是很好!主要是用在框架结构中!在树的层最好是已知的情况下,增加、减少或改变树的节点还是有点用处的。
回复
Realot_11 2002-03-11
问题解决了,是我的数据库连接语句有问题。
很是奇怪,同一条语句连接不同的数据库,有不同的效果。
有的说,服务器不信任你的ID。有的可以连通。
这是为什么。

另外我感觉,在这个JavaBean中,虽然数据是从数据库中得到的,但是数据库中表的结构不合理。一个字段对应一层,那么如果有10层,就要建立10个字段。动态性能不够。不能实现任意多层。
记录和记录之间应该用父子关系来得到,这样才能实现任意多层的结构。
你知道如何来更改吗???
谢谢。
回复
Realot_11 2002-03-11
To:tomcat4
我只是将数据库的连接语句改成我的,如下:
<jsp:useBean id="tree" scope="request" class="com.coolservlets.beans.CSTreeBean" />
<jsp:setProperty name="tree" property="jdbcDriver" value="com.inet.tds.TdsDriver" />
<jsp:setProperty name="tree" property="jdbcURL" value="jdbc:inetdae://localhost:1433?database=PDM" />
<jsp:setProperty name="tree" property="jdbcUser" value="test" />
<jsp:setProperty name="tree" property="jdbcPassword" value="test" />

其它没有变,为什么会出错????
错误信息如下:
Error: 500 Location: /\tree.jspInternal Servlet Error:javax.servlet.ServletException: /_0002f_0002ftree_0002ejsptree_jsp_4 (wrong name: _0002f_0002ftree_0002ejsptree_jsp_4)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:399)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)
Root cause: java.lang.NoClassDefFoundError: /_0002f_0002ftree_0002ejsptree_jsp_4 (wrong name: _0002f_0002ftree_0002ejsptree_jsp_4)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.lang.ClassLoader.defineClass(ClassLoader.java:426)
at org.apache.jasper.servlet.JasperLoader12.defClass(JasperLoader12.java:110)
at org.apache.jasper.servlet.JasperLoader.findClass(JasperLoader.java:220)
at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:147)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:486)
at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:152)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:164)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)
应该有那些是特别要注意的???
回复
Realot_11 2002-03-09
.java 文件如下:
package .CSTreeBean_0002d_00030_0005f_00033.example;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.FileInputStream;
import java.io.ObjectInputStream;
import java.util.Vector;
import org.apache.jasper.runtime.*;
import java.beans.*;
import org.apache.jasper.JasperException;


public class _0002f_0002fCSTreeBean_0002d_00030_0002e_00033_0002fexample_0002fTreeFrames_0002ejspTreeFrames_jsp_0 extends HttpJspBase {


static {
}
public _0002f_0002fCSTreeBean_0002d_00030_0002e_00033_0002fexample_0002fTreeFrames_0002ejspTreeFrames_jsp_0( ) {
}

private static boolean _jspx_inited = false;

public final void _jspx_init() throws JasperException {
}

public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {

JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
String _value = null;
try {

if (_jspx_inited == false) {
_jspx_init();
_jspx_inited = true;
}
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html;charset=8859_1");
pageContext = _jspxFactory.getPageContext(this, request, response,
"", true, 8192, true);

application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();

// HTML // begin [file="D:\\QB_webroot\\defaultroot\\CSTreeBean-0.3\\example\\TreeFrames.jsp";from=(0,0);to=(17,0)]
out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\r\n<HTML>\r\n<HEAD>\r\n<META name=\"GENERATOR\" content=\"IBM WebSphere Page Designer V3.0 for Windows\">\r\n<TITLE>CSTreeBean Simple Example</TITLE>\r\n</HEAD>\r\n<FRAMESET cols=\"30%,70%\">\r\n<FRAME src=\"TreePane.jsp\" name=\"lhs\">\r\n<FRAME src=\"DestinationPane.jsp\" name=\"rhs\">\r\n<NOFRAMES>\r\n<BODY>\r\n<P>Need browser which supports frames to see\r\nthis page</P>\r\n</BODY>\r\n</NOFRAMES>\r\n</FRAMESET>\r\n</HTML>\r\n");
// end

} catch (Exception ex) {
if (out.getBufferSize() != 0)
out.clearBuffer();
pageContext.handlePageException(ex);
} finally {
out.flush();
_jspxFactory.releasePageContext(pageContext);
}
}
}

我实在是不知道那里错了,高手帮助!!!!
回复
yuanzi 2002-03-08
估计是标识符或类名写错了。你可以把生成的java文件打开看看,错误应该是在第1行和第17行,要不你把程序贴出来让大家看看。
回复
yanchang 2002-03-08
没程序啊!
我猜不出来!
回复
发动态
发帖子
Web 开发
创建于2007-09-28

7.9w+

社区成员

Java Web 开发
申请成为版主
社区公告
暂无公告