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

 About This Book

 JSP (JavaServer Pages) Overview

 Tomcat Installation on Windows Systems

 JSP Scripting Elements

 Java Servlet Introduction

 JSP Implicit Objects

 Syntax of JSP Pages and JSP Documents

 JSP Application Session

 Managing Cookies in JSP Pages

 JavaBean Objects and "useBean" Action Elements

 Managing HTTP Response Header Lines

 Non-ASCII Characters Support in JSP Pages

 Performance of JSP Pages

 EL (Expression Language)

 Overview of JSTL (JSP Standard Tag Libraries)

 JSTL Core Library

 JSP Custom Tags

 JSP Java Tag Interface

 Custom Tag Attributes

 Multiple Tags Working Together

 File Upload Test Application

 Using Tomcat on CentOS Systems

 Using Tomcat on macOS Systems

Connecting to SQL Server from Servlet

SQL Server Connection Requirements

 Download and Install SQL Server JDBC Driver

 Test SQL Server JDBC Driver

 Use JDBC Driver in Servlet

 Load JDBC Driver Class in Servlet

 Developing Web Applications with Servlet

 Archived Tutorials

 References

 Full Version in PDF/EPUB