How to configure Tomcat to connect with MySQL

Viewed 74183

Could someone provide a few details on how to configure Tomcat to access MySQL?

  1. In which directory within Tomcat do I place mysql-connector-java-5.1.13-bin? Should I place it under Tomcat 6.0\webapps\myapp\WEB-INF\lib?

  2. Do I need to add configuration to context.xml or server.xml?

  3. Should I create a web.xml file and place it under Tomcat 6.0\webapps\myapp\WEB-INF? If so, then what should the contents of this file look like?

2 Answers
Related