1. 背景 最近在读<Java concurrency in practice>(Java并发实战),其中1.4节提到了Java web的线程安全问题时有如下一段话: Servlets and JPSs, as well as servlet filters and objects stored in scoped containers like ServletContext and HttpSession, simply have to be thread-safe. Servlet, JS…