Hey.
I have made some servlets that is connected to a database. these
servlets are quite similar in funtion. so i thaught:
Why don't i write a class thats connected to the database and then
lett my servlets use that class to fetch data. that way i'm only
using 1 connection to the database and i dont have to write versions
of the same method in the each and every one of the servlets.

In the database-connected class the connection to the database is
static

Question one:
is this not a good idea? and in that case, why?

Question two:
When i try to instantiate my database-connected class i get a "cannot
resolve symbol" error at combile.
The class that i'm trying to instantiate are located in the same
directory, and the servlet is working fine without it.
Where shall i put it?
I've tried the lib dir, no luck.

Thankful for any help!

Thanks in advance
Bj�rn Alexandersson
---------------------------------------------------------------------
Message written: 2002-04-26 kl. 21:24:24
Email: [EMAIL PROTECTED]
Telephone: +46(0)611-550 771
Cell: +46(0)70-659 93 17
Facs: +46(0)611-550 774

___________________________________________________________________________
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

Reply via email to