Struts2 & Servlet 线程,生命周期小理解
?????????????????????????????????????????? Servlet?????????????????????????????????????????????????????? Struts2
??????????????????? init????????????????? when the request arrive???????????????????? when the request arrive
lifecycle??????? service??????????? exist in container??????????????????????????????? exist in container??
??????????????????? destroy?????????? by container??????????????????????????????????????? request thread destroy
?
?
thread???????????????????????????????? exist in container all request?????????????? ActionContext is thread local
??????????????????????????????????????????? share the same servlet ,???????????????????? each thread have a ActionContext
??????????????????????????????????????????? thread-unsafe????????????????????????????????? ? thread-safe