Container是如何工作的
Less than 1 minute
Java web 应用通常会跑在 Container上面,比如人尽皆知的 Tomcat。下面我们来看下 Tomcat 是怎么工作的
工作流程
The servlet lifecycle is simple; there’s only one main state—initialized.If the servlet isn’t initialized, then it’s either being initialized (running its constructor or init()method), being destroyed (running its destroy() method), or it simply does not exist.
The Three Big Lifecycle Moments
The Container runs multiple threads to process multiple requests to a single servlet