In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how jsp links to the mysql database. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
How to connect jsp to mysql: first download the JDBC driver from mysql's official website; then put the jar package in the lib folder of tomcat's installation directory; then create test data in mysql; finally, create a project in eclipse and create a JSP file to run.
Jsp connection to MYSQL Database tutorial
Steps:
1. Download the JDBC driver on the mysql official website. Web site: https://dev.mysql.com/downloads/connector/j/
two。 Put the jar package (mysql-connector-java-5.1.41-bin.jar) inside it in the lib folder of the tomcat installation directory, such as my directory: C:\ apache-tomcat-8.0.36-windows-x64\ apache-tomcat-8.0.36\ lib. Restart tomcat.
3. To create test data in mysql, first create a database named testdb;, and then create a table named testform, which has three fields: id,name,age; and finally add several rows of test data.
Create a project in 4.eclipse and create a JSP file named test.jsp. The test.jsp code is as follows: (note that the corresponding parameters are modified)
5. Run the jsp file.
On how to link jsp mysql database to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.