Hello,
I am having a slight problem with my servlets. I have a connection pool
class and a general servlet class. I want to include the connection pool
class as a private member of the general servlet. I do this like:
public class UsefulAddresses extends HttpServlet {
private ConnectionPool pool;
public void init(ServletConfig config) /* Called first time servlet
recieves a
request */
throws ServletException {
super.init(config);
try{
pool = new ConnectionPool("org.gjt.mm.mysql.Driver",
"jdbc:mysql://localhost/DundeeInfoService","*****", "********", 5);
}
catch (Exception E) {
System.err.println("Unable to load driver.");
E.printStackTrace();
}
} /* End of init() method */
But when i compile I get the following error. I have tried having them in
the same package, importing the class but no result. They are both in
jakarta-tomcat/webapps/root/web-inf/classes
UsefulAddresses.java:28: cannot resolve symbol
symbol : class ConnectionPool
location: class UsefulAddresses
private ConnectionPool pool;
^
UsefulAddresses.java:36: cannot resolve symbol
symbol : class ConnectionPool
location: class UsefulAddresses
pool = new ConnectionPool("org.gjt.mm.mysql.Driver",
"jdbc:mysql://local
host/DundeeInfoService","*****", "******", 5);
^
3 errors
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html