JSP Tutorials - Herong's Tutorial Examples - v5.11, by Herong Yang
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
JSP (JavaServer Pages) Overview
Tomcat Installation on Windows Systems
Creating and Deploying a Servlet on Tomcat
Relationship between Servlet and JSP
Modifying the Servlet Converted from a JSP Page
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