|
|
Adding a survey to your databaseCopy and paste this code into your own when storing a survey in a database.<%@ page language=java %> <% Connection conn = source.getConnection(); String name = request.getParameter("name"); stmt.executeUpdate( conn.close(); } %> <h1>Thank you, <%= name %></h1> Ensure that the database connection is closed, so that it automatically returns to the pool. Using the try through to finally syntax will guarantee that the connections are returned to the database connection pool. |