JSP program using JDBC to connect mysql tutorial

Installing and loading JDBC drivers

Download the jdbc driver mysql-connector-java-5.1 7.zip http://www.jb51.net/softs/214141.html Put the file mysql-connector-java-5.1 7-bin. Jar is placed in the Lib file under the WEB-INF directory of the project, and the installation is completed (provided that your machine has installed mysql, if not installed, install it first)

Load in JDBC Driver

Connect mysql database, start MySQL and tomcat,

Connect to the database using JDBC.

The first way

The second way

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>