What Is Servlet

This section describes what is Servlet - A Java based technology that allows you to serve dynamic content with Java Servlet classes through a Web server.

What Is Servlet? Servlet is a Java based technology that allows you to serve dynamic content with Java Servlet classes through a Web server.

Usually, a Servlet enabled Web server will have a Servlet engine (also called Servlet container) working together with the Web server to handle all HTTP requests from Web browsers.

Here is how a typical Servlet container works:

1. A Web browser sends HTTP request to the Web server.

2. The Web server looks at the path name of the request. If it knows how to handle the request, it will send back the HTTP response.

3. If the request refers to a path name managed by the Servlet container, the Web server forwards the request to the Servlet container.

4. The Servlet container looks at the path name of the request and calls the Java Servlet class that is mapped to the path name.

5. The Java Servlet class then executes its programmed logics to generate the HTTP response.

6. The HTTP response will be returned back to the Web browser by the Servlet container.

For more information on Servlet, see the latest release of Servlet specification, https://jcp.org/en/jsr/detail?id=369.

Table of Contents

 About This Book

 JSP (JavaServer Pages) Overview

 Tomcat 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

 Using Tomcat on CentOS Systems

 Using Tomcat on macOS Systems

 Connecting to SQL Server from Servlet

 Developing Web Applications with Servlet

 Archived Tutorials

 References

 Full Version in PDF/EPUB