更新时间:2023-12-04 12:09:10
通常情况下,***解决方案取决于上下文和必须提供的功能. 我认为在大多数情况下,允许从单个servlet处理多个路径将更为有效,因为它只允许针对多个情况开发一个servlet. 在以下情况下,***将一组路径映射到单个servlet:
As it is often the case, what is best depends on the context and the functionality that must be offered. I would assume that in most cases allowing multiple paths to be handled from a single servlet would be more efficient as it allows the development of only one servlet for multiple cases. Mapping a group of paths to a single servlet would be preferable in the following cases:
不过,为每个servlet分配一个路径可能是有益的:
However it could be the cases that assigning a single path per servlet would be beneficial: