Relationship between Servlet and JSP

This section describes the relationship between of Servlet and JSP. Most JSP servers (containers) are implemented to support the JSP technology as an extension of the Servlet technology.

By looking at their specifications JSP and Servlet are 2 different technologies that can be used with Web servers to write dynamic HTTP responses:

But most JSP servers (containers) are implemented to support the JSP technology as an extension of the Servlet technology. JSP pages are first converted into Servlet classes internally before executing them.

The diagram below shows you how Apache Tomcat uses Servlet technology to serve JSP pages:
Apache Tomcat JSP Servlet Relation

Last update: 2012.

Table of Contents

 About This Book

 JSP (JavaServer Pages) Overview

 Tomcat 7 Installation on Windows Systems

 JSP Scripting Elements

Java Servlet Introduction

 What Is Servlet?

 Creating and Deploying a Servlet on Tomcat

Relationship between Servlet and JSP

 Modifying the Servlet Converted from a JSP Page

 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

 Outdated Tutorials

 References

 PDF Printing Version