Java Web Learning (i) Tomcat's first attempt

Source: Internet
Author: User
Tags http request java web tomcat

Tomcat is a set of Open-source software developed by Apache Software Foundation (ASF) for implementing Java Servlet and JavaServer Page (JSP) technology.

Tomcat is what the male cat means. In O ' Reilly's animal book, the cat has been used as the cover of another book. So, the cover of Tomcat's O ' Reilly book is the Snow Leopard (Snow Leopard):

Cat becomes Snow Leopard

Tomcat Features

The core of Tomcat is a servlet Container. A servlet is a special kind of Java object that works on a Web server, analyzes requests, and generates corresponding replies (response). Servlet container is used to start and invoke Servlet objects. When an HTTP request enters the Web server, the servlet container looks for the appropriate servlet, and if the servlet does not exist, then container needs to create the object. The servlet container then passes the requested content to the servlet and sends the servlet-generated reply back to the server program that is responsible for the communication.

Blue for request, red for reply

For an HTTP protocol and Web server, see Protocol Forest HTTP protocol

The Web server uses the HTTP protocol to communicate directly with customers. Tomcat itself contains the functionality of a Web server. You can also use other Web servers, such as the Apache server, to provide a more powerful Web server.

Tomcat also has an important function of processing JSP files. JSP can be seen as a high-level servlet, which will eventually be translated into a servlet run. We write JSP files in the form of template language, which is similar to how PHP is written. You can include HTML elements directly in a JSP file. Using JSP technology, we can detach the view from the servlet, let JSP take charge of the page rendering way, and realize MVC (Model-view-control) better. The Jasper module in Tomcat is responsible for the translation of JSP.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.