You can take a look at the three files below (one jsp and two. java), when I enter the address in IE, the following error is prompted (the code should be correct, and I don't know if it is set). I am very grateful for the high finger instruction:
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 ");
^
// The following two are connection pools, and the following two files are placed in a mybean package.
Package mybean;
Import java. SQL .*;
Import java. util .*;
Public class DBConnPool {
// Number of connections in use
Private int using;
// Currently available connections, that is, idle connections
Private Vector connections = new Vector ();
// Maximum number of connections
Private int maxconn;
// Connection pool name