A servlet needs to read its own initialization parameters and also share a database connection pool. Which combination of objects should it use?

  • getInitParameter() and ServletContext
  • getServletConfig() and getServletContext()
  • getServletContext() and getInitParameter()
  • getServletContext() and getInitParameter()
To read its own initialization parameters, a servlet should use getInitParameter(). To share a database connection pool, it should use the ServletContext, which is accessible via getServletContext().
Add your answer
Loading...

Leave a comment

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