How can servlet initialization parameters be used effectively for database connectivity?

  • By embedding database connection details directly in the servlet code.
  • By relying on default database configurations provided by the servlet container.
  • By storing database connection details as initialization parameters and retrieving them in the servlet's init() method.
  • By using context parameters instead of initialization parameters for database connectivity.
Servlet initialization parameters can be used effectively for database connectivity by storing database connection details in the web.xml file and retrieving them in the servlet's init() method for establishing connections.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *