JSP Summary 2: Servlet

Source: Internet
Author: User

Servlet is a piece of Java code that can expand the functions of the Web server. Each Servlet is running in the process, and a new Servlet request is run in the Servlet process as a thread.
The Servlet container is responsible for connecting the Web server and Servlet process. The Servlet is responsible for providing the runtime environment of the Servlet and loading and calling these servlets at the appropriate time. The Servlet container can run in the same process as the Web server, or separately. Even some Servlet containers are Web servers, such as Tomcat.
The Servlet container passes the user's request to the Servlet, and then converts the Servlet response to an http Response Message and returns it to the customer.
Each Servlet process has a Servlet Context. This Servlet Context corresponds to a Web application. Servlet Context is associated with a url path prefix.
Generally, after the Servlet receives a request from the client passed by the Servlet container, it processes some business logic and then writes the html code to the response stream. However, this method makes it difficult to maintain the business logic and the web ui, which makes it impossible for programmers and WEB designers to work separately.

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.