ccl.servlet
Class TableHelpServlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--ccl.servlet.TableHelpServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public abstract class TableHelpServlet
extends javax.servlet.http.HttpServlet

This abstract servlet gets a connection and then looks for all user tables in that database and prints them out. The user can then select a single table to see all column definition on a dedicated html page.

See Also:
Serialized Form

Constructor Summary
TableHelpServlet()
           
 
Method Summary
abstract  void close(HTML html)
          The parent class knows how to close the html code.
abstract  java.sql.Connection createConnection()
          Returns the connection to find all db tables.
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          The main servlet method.
abstract  void printTitle(HTML html)
          The parent class knows how to print its title.
abstract  void printTOC(HTML html)
          The parent class knows how to print its table of content.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableHelpServlet

public TableHelpServlet()
Method Detail

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws java.io.IOException,
                  javax.servlet.ServletException
The main servlet method. It uses the parent class to receive a db connection and to print the application layout.

Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
java.io.IOException - in case anything goes wrong writing output to the http servlet response.
javax.servlet.ServletException - in case the servlet has a failure.

printTitle

public abstract void printTitle(HTML html)
The parent class knows how to print its title.


printTOC

public abstract void printTOC(HTML html)
                       throws java.lang.Exception
The parent class knows how to print its table of content.

Throws:
java.lang.Exception - if anything goes wrong.

close

public abstract void close(HTML html)
The parent class knows how to close the html code.


createConnection

public abstract java.sql.Connection createConnection()
                                              throws java.sql.SQLException
Returns the connection to find all db tables. Connection will be closed by this class after usage.

Throws:
java.sql.SQLException - if anything goes wrong.