Since you're running a servlet make sure you:
1) Have a valid driver for the database
2) Have placed it in the WEB-INF/lib directory of your application (if it's an archive) or in your WEB-INF/classes directory (if it's a single class or extracted from an archive)
3) If the driver class is in your classes directory structure, remember that it must be placed in a directory structure that corresponds to the package statement of the class
4) Have imported the driver's package for your implementing class
5) Depending on your application server, you may need to change .zip extensions to .jar if you are using an archive
6) Properly load the driver (I use Class.forName())
7) Make sure the driver is registered with the DriverManager
8) Make sure your database is up and running
9) Double-check your connection URL, including the port #
These are standard steps no matter what you're trying to do, and they're the only advice we'll be able to give without a code snippet.
Let us know if you get things working, or post some code to help us help you.
|