Example of using JDBC to access SQL Server 2008 database in JSP
•
Java
Direct access to the database by jdbc driver advantages: 100% Java, fast and cross platform disadvantages: you need to download a special jdbc driver to access different databases
(1) Download and install the jdbc driver of the corresponding database version. Pay attention to the three files after installation: msbase.jar, mssqlserver.jar and msutil.jar. Copy them to the WEB-INF / lib of the JSP project and lib of the Tomcat installation directory. There is no specific test. They should be related to the configuration file.
(2) Data source, not required
(3) Configuration file, not required
(4) Write JSP file test
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
二维码