FileDocCategorySizeDatePackage
OCCIConnectionReportServlet.javaAPI DocExample1154Tue Nov 21 14:19:14 GMT 2000None

OCCIConnectionReportServlet.java

import java.io.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class OCCIConnectionReportServlet extends HttpServlet {

 public void doGet(
  HttpServletRequest request, 
  HttpServletResponse response) 
  throws IOException, ServletException {

  response.setContentType("text/html");
  PrintWriter out = response.getWriter();
  out.println("<html>");
  out.println("<head>");
  out.println("<title>Oracle Cached Connection " + 
   "Implementation Report Servlet</title>");
  out.println("</head>");
  out.println("<body>");
  out.println(
   "<h1>Oracle Cached Connection Implementations</h1>");
  out.println("<pre>");
  String[] lines = OCCIConnection.getReport();
  if (lines != null && lines.length > 0) {
   for (int i=0;i < lines.length;i++) {
    out.println(lines[i]);
   }
  }
  else
   out.println("No caches implemented!");
  out.println("</pre>");
  out.println("</body>");
  out.println("</html>");
 }

 public void doPost(
  HttpServletRequest request, 
  HttpServletResponse response)
  throws IOException, ServletException {
  doGet(request, response);
 }
}