ch7.accountLogin
Class Controller

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by ch7.accountLogin.Controller
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class Controller
extends javax.servlet.http.HttpServlet

The user must enter a valid account number before proceeding to the edit page.

See Also:
Serialized Form

Constructor Summary
Controller()
           
 
Method Summary
protected  void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Use a helper to do the work of the controller.
protected  void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Use a helper to do the work of the controller.
 void init()
          When the servlet is loaded into memory, initialise Hibernate.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Controller

public Controller()
Method Detail

init

public void init()
When the servlet is loaded into memory, initialise Hibernate.

Reads an initialisation parameter from the web.xml file that controls whether the database table should be created. Whenever it is created, the old data is destroyed.

Overrides:
init in class javax.servlet.GenericServlet

doGet

protected void doGet(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
              throws java.io.IOException,
                     javax.servlet.ServletException
Use a helper to do the work of the controller.

Overrides:
doGet in class javax.servlet.http.HttpServlet
Parameters:
request - Request information encapsulated in a Java object
response - Response information encapsulated in a Java object
Throws:
java.io.IOException
javax.servlet.ServletException

doPost

protected void doPost(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response)
               throws java.io.IOException,
                      javax.servlet.ServletException
Use a helper to do the work of the controller.

Overrides:
doPost in class javax.servlet.http.HttpServlet
Parameters:
request - Request information encapsulated in a Java object
response - Response information encapsulated in a Java object
Throws:
java.io.IOException
javax.servlet.ServletException