servlet Container and Web container _ back-end Framework deployment

Source: Internet
Author: User

servlet container, responsible for managing the servlet lifecycle.

Web container, which is responsible for managing and deploying Web applications that may itself have servlet container components, and, if not, the ability to consolidate third-party servlet containers as components into web containers.

1.Web containers are like televisions, and servlet containers are like VCD.

Without the 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'll have to install a servlet container, but it's not enough to have a servlet container. Because it's going to be parsed into HTML output, you still need a Web container.

Most servlet containers also provide the functionality of the Web container, which means that most servlet can run your Web application independently.

2. Container is actually a service program, there is a server on a port to provide the appropriate service program, and this program is to handle requests from the client, such as Java in the Tomcat container, ASP IIS or PWS are such containers, a server more than one container.

3.Web Container provides an environment for the application component (Jsp,servlet) in which the JSP, Servlet and the services in the container are directly connected to each other, without paying attention to other system issues. Web container are mainly implemented by Web servers. For example: Tomcat,weblogic,websphere and so on. For example, the servlet container provided by Resin 2.1.x and above implements the Java EE servlet 2.3 specification. Our web server that adheres to the above standards is called the Web container in Java EE.

Web containers are more about dealing with HTTP-based requests. And the EJB container is not. It's more about databases and other services. But they are both implementing interactions with the outside world to ease the burden on the application. For example, the servlet does not care about HTTP details, directly referencing the environment variable session,request,response on the line, EJB does not care about the database connection speed, various transaction control, directly by the container to complete.

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.