How does jsp link to the mysql database?

Source: Internet
Author: User

1: Install the mysql database on the data server. This is required. On your own ssh or virtual machine, you can see related prompts on data mysql, indicating that the installation is successful:

2: I am using a tomcat server. Here, I need to install java to connect to the mysql database operation library. The jar package I used is: mysql-connector-java-3.1.14.tar.gz,

You can download it online or on the official website:

3: Put the unwrapped jar in the lib folder in tomcat:

4: add the connection function library and library function in the code segment of the program to connect to the mysql database:

5: The rest is that we call this data when using it. In jsp, we use the data in the mysql database:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.