Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mysql driver

 
James Hoare
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys, I have just set up Tomcat 5.5 on my XP machine and I have mysql installed also. If I want to start using JDBC in my servlets with mysql, what jar file do I need and where in Tomcat do I install it to?

Thanks
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15440
41
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can get a JDBC driver from MySQL on the MySQL website.

The best place to install it is put it in the WEB-INF/lib directory of your web application.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jesper Young:
The best place to install it is put it in the WEB-INF/lib directory of your web application.


Unless you're using container managed connection pooling, in which case, Tomcat needs access to the driver so it should go under tomcat/common/lib.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic