When a server loads a servlet, the server runs the servlet's init method.
Initialization completes before client requests are handled and before the servlet is destroyed.
Even though most servlets are run in multi-threaded servers, servlets have no concurrency issues during servlet initialization. The server calls the init method once, when the server loads the servlet, and will not call the init method again unless the server is reloading the servlet. The server can not reload a servlet until after the server has destroyed the servlet by calling the destroy method. The init method provided by the HttpServlet class initializes the servlet and logs the initialization. An example of this type of error is the inability to establish a required network connection.