Head First Servlets & JSP Study Notes Chapter 2 - Web Application Architecture

Servlet does not have a main() method, so the servlet is controlled by someone else, and this other person is the container ! Tomcat is a container.

The   container

What can Tomcat ( container) do? 1. Communication support (communication bridge between servlet and WEB server) 2. Life cycle management (loading classes, instantiation, initialization, calling methods, destroying) 3. Multi-threading support 4. Declarative way to achieve security 5. JSP support ( Translate JSP to Java code)

When a servlet is deployed to a Tomcat container, a fairly simple XML document (web.xml) is created, which is called a deployment descriptor.

The deployment

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324549172&siteId=291194637