edu.uoc.pfc.j2ee.jalonsod.mtp
Class Controller

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by edu.uoc.pfc.j2ee.jalonsod.mtp.Controller
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class Controller
extends javax.servlet.http.HttpServlet

File: Controller.java Created: 2012-04-21 The front controller of the framework. Loads configuration & controls the request life cycle.

Author:
José Alonso de Motta
See Also:
Serialized Form

Field Summary
private static java.util.logging.Logger logger
           
private static java.lang.String PARAMETER_CONFIGFILE
          The initialization parameter name in the web.xml that holds the application config file name for the framework.
private static java.lang.String PARAMETER_LOGGER_LEVEL
          The initialization parameter name in the web.xml that holds the application logger level.
private static long serialVersionUID
           
 
Constructor Summary
Controller()
           
 
Method Summary
protected  void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  void doGetPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Request life cycle processor.
protected  void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 void init(javax.servlet.ServletConfig config)
          Loads configuration in the initialization stage of the servlet
 
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
 

Field Detail

logger

private static final java.util.logging.Logger logger

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

PARAMETER_CONFIGFILE

private static final java.lang.String PARAMETER_CONFIGFILE
The initialization parameter name in the web.xml that holds the application config file name for the framework.

See Also:
Constant Field Values

PARAMETER_LOGGER_LEVEL

private static final java.lang.String PARAMETER_LOGGER_LEVEL
The initialization parameter name in the web.xml that holds the application logger level.

See Also:
Constant Field Values
Constructor Detail

Controller

public Controller()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Loads configuration in the initialization stage of the servlet

Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

doGet

protected void doGet(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
              throws javax.servlet.ServletException,
                     java.io.IOException
Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

doPost

protected void doPost(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response)
               throws javax.servlet.ServletException,
                      java.io.IOException
Overrides:
doPost in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

doGetPost

protected void doGetPost(javax.servlet.http.HttpServletRequest request,
                         javax.servlet.http.HttpServletResponse response)
                  throws javax.servlet.ServletException,
                         java.io.IOException
Request life cycle processor.

Parameters:
request - the request object.
response - the response object
Throws:
javax.servlet.ServletException
java.io.IOException