File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes MY SQL database connectivity Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "MY SQL database connectivity" Watch "MY SQL database connectivity" New topic

MY SQL database connectivity

yash Vi
Ranch Hand

Joined: Jul 17, 2005
Posts: 41
I have got the Type 4 JDBC Driver as follows,
I downloaded the zip file from the following site,

I have put the following part of the extracted file
into the folder \Tomcat 4.1\webapps\ROOT\WEB-INF\lib

How do I set the Classpath for this and what is the connection dtring to be mentioned in the Class.forname statement.. Please help

Thanks for your reply and time.<br />Windows 2000,j2sdk1.4.2_08
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

You should look at the documentation on the Tomcat site -- especially this page:

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17249

Moving to the Apache/Tomcat forum.


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Rahul Singh Khokhar
Ranch Hand

Joined: Feb 23, 2005
Posts: 36
Hi Yash,
I believe the easiest way to get your class4 drivers working is to simply place the jdbc driver (.jar file) into your /java/jre/lib/ext folder.
Tomcat will happily work with this arrangement if you have set up the JVM correctly in your Tomcat.

I agree. Here's the link:
subject: MY SQL database connectivity
Similar Threads
mysql JDBC driver classpath problem.
JDBC Connection to MS Access DB without ODBC
JDBC-Mysql relation
MySQL-Java Forms
Setting up MySQL dataSource in WSAD 5.1.1