This process of initializing a servlet using the initialization parameters from the
ServletConfig object is quite important in order to ensure the reusability of a
servlet. For example, if we wanted to create a database connection in the servlet we
would not want to hard-code the username/password and the database URL in the
servlet. The init() method allows us to specify them in the deployment descriptor.
The values in the deployment descriptor can be changed as needed without affecting
the servlet code. When the servlet initializes, it can read the values in its init()
method and make the connection.
It does not make sense to initialize an object repeatedly; therefore, the framework
guarantees that the servlet container will call the init() method once and only once
on a servlet instance.