JSP用串連池連資料庫的問題

來源:互聯網
上載者:User

各位高手麻煩幫我看下面這三個檔案(一個jsp,兩個.java),我在IE輸入地址時,提示如下錯誤(代碼應該沒有錯,不知是不是設定的問題),望高手指教,不勝感激:
D:Program FilesApache GroupTomcat 4.1workStandalonelocalhost_shoppingindex_jsp.java:44: package mybean does not exist
      mybean.DBConnManager connManager = null;
            ^
An error occurred at line: 2 in the jsp file: /shopping/index.jsp
Generated servlet error:
D:Program FilesApache GroupTomcat 4.1workStandalonelocalhost_shoppingindex_jsp.java:46: package mybean does not exist
        connManager = (mybean.DBConnManager) pageContext.getAttribute("connManager", PageContext.APPLICATION_SCOPE);
                             ^
An error occurred at line: 2 in the jsp file: /shopping/index.jsp
Generated servlet error:
D:Program FilesApache GroupTomcat 4.1workStandalonelocalhost_shoppingindex_jsp.java:49: package mybean does not exist
            connManager = (mybean.DBConnManager) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "mybean.DBConnManager");
                                 ^
//下面這兩個是串連池,下面兩個檔案都放在一個mybean的包裡.
package mybean;
import java.sql.*;
import java.util.*;
public class DBConnPool {
  //正在使用串連的數量
  private int using;
  //目前可用的串連數,即空閑串連
  private Vector connections=new Vector();
  //最大串連數
  private int maxconn;
  //串連池名
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.