請高手幫忙分析一個JSP小程式的問題

flag發表於2004-05-16
我用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>

<p class="indent">


***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>

<p class="indent">

相關文章