Prentice Hall and Sun Microsystems. Personal use only; do not redistribute.
510
Chapter 18 JDBC and Database Connection Pooling
Listing 18.20 ConnectionPoolServlet.java (continued)
table = results.toHTMLTable("#FFAD00");
} catch(Exception e) {
table = "Error: " + e;
}
response.setContentType("text/html");
// Prevent the browser from caching the response. See
// Section 7.2 of Core Servlets and JSP for details.
response.setHeader("Pragma", "no cache"); // HTTP 1.0
response.setHeader("Cache Control", "no cache"); // HTTP 1.1
PrintWriter out = response.getWriter();
String title = "Connection Pool Test";
out.println(ServletUtilities.headWithTitle(title) +
"\n" +
"\n" +
table + "\n" +
"\n