什么是HTTP请求的servlet容器和调度器servlet的顺序?

huangapple go评论83阅读模式
英文:

What is sequence of servlet-container and dispatcher servlet for http request?

问题

Servlet容器和分发器Servlet在HTTP请求中的顺序是什么?
Servlet容器位于分发器Servlet之前吗?
有些帖子解释了Dispatcher Servlet位于Servlet容器中。
但我知道Tomcat是一种Servlet容器,而dispatcher-servlet是Spring的功能。所以这有点奇怪。

英文:

What is sequence of servlet-container and dispatcher servlet for http request?
Is servlet container front of dispatcher servlet?
Some posts explain Dispatcher servlet is in Servlet container.
But I know Tomcat is kind of servlet container and dispatcher-servlet is Spring's feature. So it's wired.

答案1

得分: 3

  • Dispatcher Servlet 只是普通 Servlet 的一个常规名称。它被称为“dispatcher”,因为它简单地将请求分派给相应的处理程序 Servlet 对象。这不是 Spring 的特性,而是 Spring 在实现其机制时经常使用的东西。

  • Servlet 容器 是 Web 容器,简单地包含 Servlet 并管理它们的生命周期。有多个 Servlet 容器的实现,其中之一可以在 Apache Tomcat 中找到。

  • Tomcat 不是“某种类型的”,而是具有 Servlet 容器引擎。

Dispatcher Servlet(像任何其他 Servlet 一样)存在于 Servlet 容器中。

英文:
  • Dispatcher Servlet is just a conventional name for the ordinary servlet. It's called "dispatcher" because it simply dispatches requests to the corresponding handler servlet objects. It is not Spring feature, rather, Spring uses it a lot for implementing its mechanisms.

  • Servlet Container is the Web Container, which simply contains სervlets and manages their lifecycle. There are several Servlet Container implementations and of those implementations is found in the Apache Tomcat.

  • Tomcat is not kind of, but it has a Servlet Container engine.

Dispatcher Servlet (like any other servlet) lives within the Servlet Container.

huangapple
  • 本文由 发表于 2020年8月1日 16:43:38
  • 转载请务必保留本文链接:https://go.coder-hub.com/63203369.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定