What are the differences and relationships between Web container Web server servlet/jsp containers?

Source: Internet
Author: User

What are the differences and relationships between Web container Web server servlet/jsp containers?

Here is some information I found on the Internet:
1. In addition to opening a Web page document on a local hard disk, the Web browser can also use the HTTP network protocol to obtain the contents of a Web page document from a Web server (also called a WWW server) on the network.

2. The Web browser and the Web server represent the clients and servers of the TCP network program, respectively.

3. Regardless of the size of the site, the minimum effort is to install some kind of Web server software on the computer that is used as the Web server. As long as the Web server software is installed on a single computer, this computer can become a Web server in a functional sense. The Web server consists of two layers of hardware-computer and software-as-web-server software. There are currently two types of Web server Software: IIS and Apache, but none of them directly supports servlet and JSP programs. To run Servlets and JSPs in these Web server software, you must also integrate them with some kind of servlet and JSP container (engine).

4. Tomcat is the recommended servlet and JSP container for sun, which can be integrated into IIS and Apache. Tomcat also has some basic features of the Web server, just basic functionality. For general Web applications, we can run Tomcat directly as a Web server software.

5. In the Java EE platform, there are servlets and JSP containers, EJB containers and other containers.

6. The primary task of the servlet container is to manage the life cycle of the servlet. And the Web container, it is to manage and deploy the Web application, the person thinks that the Web container includes the Web server and Servelt, JSP container two layers meaning. Of course, Tomcat can be considered as a Sevlet container, Web container, and Web server Software General function server: Broadly speaking, there are a lot of concepts, the hardware angle is a high-performance computer. The server We usually refer to is the computer of the server software that can handle the specific request transaction. such as the most common WWW server, mail server, billing server, FTP server and so on. Many times people often refer to such things as Tomcat, IIS, and Weblogic as Web servers, which can be confusing for beginners, but they are just application Server software for developing, integrating, deploying, and managing Web applications, Web applications, and database applications.
7.web Container: A popular web container is a software that supports publishing Web applications.
Under the 8.B/S structure, a common water supply system, for example, the entire web system is like a complete water supply system, the user only need to have a faucet (broswer), water pipe equivalent to the computer network (network), water company's water supply system (ie, server), The pressure jug is the container (Container). The primary task of a servlet container is to manage the life cycle of the servlet. There is a server called the application server, it is more powerful than the Web server, because it can deploy EJB applications, can implement container-managed transactions, the general application server has WebLogic and WebSphere, etc., they are commercial servers, powerful but all charged. The most typical Web container is tomcat, and Tomcat is the Web container and the servlet container. Web container is like TV, servlet container like VCD, no VCD You can watch TV, right, but with VCD no TV, where do you look from? : There is no servlet container, you can also use the Web container to access static pages directly, such as installing an Apache, but if you want to display Jsp/servlet, you will install a servlet container, but the light has a servlet container is not enough, Because it is parsed into HTML output, you still need a Web container. But, notice me.     However, most servlet containers provide the functionality of the Web container at the same time, meaning that most servelt can run your Web application independently.

servlet container, responsible for managing the servlet lifecycle.    The Web container, which manages and deploys the Web application, may itself have a servlet container component, and if not, it is generally possible to integrate a third-party servlet container as a component into the Web container. The application server, which is far more powerful than the Web container, because it can deploy EJB application, can implement container-managed transaction, the general application server has WebLogic and WebSphere, they are all commercial servers, powerful but all are charged.    The most typical Web container is tomcat, and Tomcat is the Web container and the servlet container. Because of the advent of spring, the value of application servers in container-managed transactions is fading, as spring's configuration-based transaction management features can be applied to the vast majority of non-distributed transaction scenarios. The WEB container is more of a deal with HTTP-based requests. And the EJB container is not.   It is more about dealing with databases and other services. The behavior of a container is to isolate its internal application components from the communication protocols of the outside world, thereby easing the burden on the internal application components (Implementation burden). )。   For example, the SERVLET does not care about the details of HTTP, but directly refers to the environment variables session, request, response, EJB does not care about database connection speed, various transaction control, directly by the container to complete. The WEB server can respond to requests for static pages or pictures, make page jumps (redirect), or generate a dynamic response (response) delegate (delegate) to some other program, such as CGI scripts, JSP (JavaServer pages) scripts, servlets,asp (Active server Pages) scripts, server-side JavaScript, or some other server-side technology.

The WEB server simply provides an environment that can perform server-side programs and returns (program-generated) responses without exceeding the scope of the function.
The WEB server primarily handles requests that require HTML to be sent to the browser for browsing. For a beginner, it can be thought that when an Apache server is configured on a single machine, it can be used to respond to requests for access to HTML pages.  The tomcat part is actually an extension of the Apache server, but it runs independently, so when you run Tomcat, it actually runs separately as a separate process from Apache. Tomcat is a container that provides support for Servlets and JSPs to run. Servlets and JSPs can generate dynamic Web content based on real-time needs. For WEB servers, Apache only supports static web pages, and it is powerless to support dynamic Web pages, while Tomcat can serve dynamic Web pages and support static Web pages. Although it is not as fast as the usual Web server, it is not as rich as the Web server, but Tomcat is gradually expanding to support static content. Most WEB servers are written in the underlying language, such as C, and take advantage of the features of the corresponding platform, so Tomcat execution speed written in plain Java is unlikely to be comparable to them. --——————————————————————————

What are the differences and relationships between Web container Web server servlet/jsp containers?

Related Article

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.