请高手帮忙分析一个JSP小程序的问题

flag
04-05-16 3 301

我用JBuilder调试一个简单的JSP例子程序,按F9运行后,出项如下错误提示,请高手们抽空看一下,怎么解决?非常感谢!
(注:我用的是Jbuilder7+Weblogic8.1组合)
......
"register.jsp": java.lang.NoSuchMethodException: com.borland.jbuilder.webserverglue.weblogic.jsp.NadaJavac
does not define 'public static int compile(String[], java.io.PrintWriter)'
[Compilation errors : ]
"register.jsp": java.lang.Exception: [Compilation errors : ]
Exception in thread "main"
.....
"registerErrorPage.jsp": java.lang.NoSuchMethodException: com.borland.jbuilder.webserverglue.weblogic.jsp.NadaJavac
does not define 'public static int compile(String[], java.io.PrintWriter)'
[Compilation errors : ]
"registerErrorPage.jsp": java.lang.Exception: [Compilation errors : ]
Exception in thread "main"

***register.jsp文件代码如下:

// 在此输入代码
<%@ page contentType=
"text/html; charset=GB2312" %>
<%@ page errorPage=
"registerErrorPage.jsp" %>
<html>
<head>
<title>
登陆结果
</title>
</head>
<jsp:useBean id=
"RegisterBeanId" scope="session" class="jspregister.RegisterBean" />
<jsp:setProperty name=
"RegisterBeanId" property="*" />
<body bgcolor=
"#ffffff">
<%if(RegisterBeanId.isValidUser()){%>
<div align=
"center">
<h3><br>已经登陆成功!<br></h3>
<h1>
<font color=
"red">
<br>
欢迎<jsp:getProperty name=
"RegisterBeanId" property="userID"/>!
<br>
</font>
</h1>
</div>
<%}else{%>
<h1 align=
"center">你不是本站注册用户,请先注册!</h1>
</body>
</html>



***registerErrorPage.jsp代码如下:

// 在此输入java代码
<%@ page contentType=
"text/html; charset=GB2312" %>
<%@ page isErrorPage=
"true" %>
<html>
<body>

<h1>Error page register</h1>

<br>An error occured in the bean. Error Message is: <%= exception.getMessage() %><br>
Stack Trace is :
<pre><font color=
"red">
<%
java.io.CharArrayWriter cw = new java.io.CharArrayWriter();
java.io.PrintWriter pw = new java.io.PrintWriter(cw,true);
exception.printStackTrace(pw);
out.println(cw.toString());
%></font></pre>
<br>
</body>
</html>

rasclewen
2004-05-17 09:37

不是提示 java.lang.NoSuchMethodException了吗?

flag
2004-05-17 12:05

rasclewen:你好!非常感谢你的回复。
我是一个初学者,你能给出具体的解决办法吗?希望你能抽空答复一下!再次表示感谢!

freelanceer
2004-05-20 15:13

你的bean源代码没有给出怎么知道具体的错误阿