JSP Tutorials - Herong's Tutorial Examples - v5.11, by Herong Yang
SQL Server Connection Requirements
This section provides a quick introduction of requirements for connecting Tomcat Servlet pages to SQL Server databases.
If you want to generate Servlet pages using data from SQL Server database, you need to prepare for the following:
1. SQL Server is running with access information:
2. Tomcat server is running with version information. For example:
herong$ /Library/Tomcat/apache-tomcat-9.0.26/bin/version.sh Server version: Apache Tomcat/9.0.26 Server built: Sep 16 2019 15:51:39 UTC Server number: 9.0.26.0 OS Name: Mac OS X OS Version: 10.12.6 Architecture: x86_64 JVM Version: 13+33 JVM Vendor: Oracle Corporation
3. SQL Server JDBC driver that is compatible with the SQL Server version and the JVM version. See the table below:
JDBC Driver JVM SQL Server ----------- --------- ------------- 7.4 8, 11, 12 2012 - 2016 7.2 8, 11 2008R2 - 2016 7.0 8, 10 2008R2 - 2016 6.4 7, 8, 9 2008R2 - 2016 6.2 7, 8 2008 - 2016 6.1 7, 8 2008 - 2016 6.0 7, 8 2008 - 2016 4.2 7, 8 2008 - 2016 4.1 7 2008 - 2016 4.0 5, 6, 7 2008 - 2016
4. Knowledge of Java JDBC API represented by java.sql.* classes.
Table of Contents
JSP (JavaServer Pages) Overview
Tomcat Installation on Windows Systems
Syntax of JSP Pages and JSP Documents
JavaBean Objects and "useBean" Action Elements
Managing HTTP Response Header Lines
Non-ASCII Characters Support in JSP Pages
Overview of JSTL (JSP Standard Tag Libraries)
Multiple Tags Working Together
Using Tomcat on CentOS Systems
►Connecting to SQL Server from Servlet
►SQL Server Connection Requirements
Download and Install SQL Server JDBC Driver
Load JDBC Driver Class in Servlet