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

猜你喜欢

转载自k1280000.iteye.com/blog/1522771
今日推荐