File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Tomcat + Servlet + DB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Tomcat + Servlet + DB" Watch "Tomcat + Servlet + DB" New topic

Tomcat + Servlet + DB

Laurent Sate

Joined: Dec 18, 2001
Posts: 10
I have a servlet under tomcat 4.01. This servlet attack a DB2 database. In fact, this servlet doesn't find the driver to connect to the DB, however my classpath is set correctly:

Must I configure another varibale in tomcat?
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
Put the jar containing the driver in the TOMCAT_HOME/common/lib directory. I think the documentation has a discussion about how Tomcat 4 locates library files.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

If your error message is accurate, you've mistyped the drivername. Java is case-sensitive even on OS's such as Windows that aren't. Not "", but ""

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Tomcat + Servlet + DB
It's not a secret anymore!