Home  >  Article  >  Java  >  What is the role of servlet container in java

What is the role of servlet container in java

王林
王林Original
2020-05-10 10:55:453097browse

What is the role of servlet container in java

1. Compile jsp:

jsp is compiled into servlet by the server jsp engine (JspServlert is also a servlet);

2. Control forwarding:

The page client requests parameters and pages to the servlet container. The servlet container assigns different business codes to process according to different businesses. After completion, the servlet container packages the return information and sends it to the client.

3. Managing web applications

The servlet container can manage multiple Context containers, and one Context container corresponds to one web application.

(Recommended video tutorial: java video)

tomcat container model

What is the role of servlet container in java

<Context docBase="amanet" path="/amanet" reloadable="true" source="org.eclipse.jst.j2ee.server:amanet"/>
   tomcat server.xml 里面的配置信息。可以看出一个context容器只能有一个web应用程序。当web容器启动时,可以在servletContextListener 监听各个应用的启动情况
     
   传说中的上下文(Context ) 就是应用程序在服务器中路径而已。

Recommended tutorial: javaGetting started

The above is the detailed content of What is the role of servlet container in java. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn