Which of the following is a recommended approach to handle database connections in servlets?
- Closing connections after each request
- Connection pooling
- Opening new connections for each request
- Using a singleton connection
Connection pooling is a recommended approach for handling database connections in servlets, as it optimizes resource usage and enhances performance.
Loading...
Related Quiz
- How does redirection differ from request dispatching in servlets?
- What is the primary advantage of using a PreparedStatement in JDBC?
- How does a servlet container differentiate between authenticated and unauthenticated users?
- Describe how a servlet can process AJAX requests using GET and POST methods.
- What is the difference in the URL seen by the client when using forward() vs sendRedirect() in servlets?