does init() method exexutes everytime for each and every servlet instance created in a singleThreadModel implemented servlet or only the service method gets executed for separate threads for separate instances.
posted 13 years ago
Hi The "init" method executed *once* for *every* servlet instance. It does not matter implements it oe not SingleThreadedModel (STM). But in case of STM, container might decide to have several instances of the same servlet to improve performance , and "init" method will be invoked for *every* instance of the same servlet, but only *once*.
Java Platform, Enterprise Edition 6 Web Services Developer Certified Expert Exam Study Guide and Quiz Exam 1Z0-810: Upgrade to Java SE 8 Programmer Study Guide and Quiz