?
Solved

JSP and MySQL how to get the two talking

Posted on 2003-03-08
5
Medium Priority
?
159 Views
Last Modified: 2010-03-31
I have a Tomcat install and MySQL installed, now I need to know how install MySQL driver. Where do I need to put the driver and what part of the fiel. I have the mysql-connector-java-3.0.6-stable-bin.jar driver
 My CLASSPATH is already set to
C:\jakarta-tomcat-4.1.18\common\lib\servlet.jar
How can I add on or how should I change it.

Thanx
Joa
0
Comment
Question by:quin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 2

Expert Comment

by:sfotex
ID: 8095283
Just make sure the jar is in your class path...

Here is a simple program you can run to make sure you can get to the drivers...

import java.sql.*;

public class test { static public void main (String args[])
 {
   //Connection connection = null;

  try


  {
    //name  
   Class.forName("com.mysql.jdbc.Driver");
   System.out.println("Drivers loaded");
   
  }

 catch(Exception e)

  {
   System.out.println("Drivers not loaded");
   System.out.println(e);
  }
 }
}
0
 
LVL 92

Expert Comment

by:objects
ID: 8095558
Add the driver jar to:
C:\jakarta-tomcat-4.1.18\common\lib\
0
 

Author Comment

by:quin
ID: 8095694
Thanks thats what I was looking for

Joa
0
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 8095775
Good to hear, let me know if you have any problems with it.
If not, then please close the q so it can be PAQ'ed.
0
 
LVL 92

Expert Comment

by:objects
ID: 8095815
Thanks :)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses
Course of the Month8 days, 10 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question