Implementations of Wrapper are responsible for managing the servlet life cycle for their underlying servlet class, including calling init() and destroy() at appropriate times, as well as respecting the existence of the SingleThreadModel declaration on the servlet class itself.
The parent Container attached to a Wrapper will generally be an implementation of Context, representing the servlet context (and therefore the web application) within which this servlet executes.
Being the lowest in the "hierarchy",Child Containers are not allowed on Wrapper implementations, so the addChild() method should throw an IllegalArgumentException.
博客介绍了Wrapper实现负责管理底层Servlet类的生命周期,包括适时调用init()和destroy(),并尊重Servlet类的SingleThreadModel声明。Wrapper的父容器通常是Context实现,且Wrapper作为层级最低的容器,不允许有子容器。
1781

被折叠的 条评论
为什么被折叠?



