com.instantbank.lettertemplate.control.web
Class MainServlet
java.lang.Object
|
+--javax.servlet.GenericServlet
|
+--javax.servlet.http.HttpServlet
|
+--com.instantbank.lettertemplate.control.web.MainServlet
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- public class MainServlet
- extends javax.servlet.http.HttpServlet
Main Servlet of the lettertemplate ear: MVC controller in the Application layer
- Author:
- Instant-bank (Consuelo Franky)
- See Also:
- Serialized Form
Fields inherited from class javax.servlet.http.HttpServlet |
HEADER_IFMODSINCE, HEADER_LASTMOD, LSTRING_FILE, lStrings, METHOD_DELETE, METHOD_GET, METHOD_HEAD, METHOD_OPTIONS, METHOD_POST, METHOD_PUT, METHOD_TRACE |
Fields inherited from class javax.servlet.GenericServlet |
config |
Method Summary |
private void |
captureCollectionsVariables(javax.servlet.http.HttpServletRequest request)
captures Collections web session variables |
private void |
captureEnvironmentVariables(javax.servlet.http.HttpServletRequest request)
actions for a new session:
capture Environment variables,
set web session variables,
clean temporal directories |
private boolean |
controlTimeout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
control time out in lettertemplate ear |
private void |
debuggingMainServlet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
debugging MainServlet |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
process get request from user |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
process post request from user |
private RequestProcessor |
getRequestProcessor()
auxiliary method that instances an unique RequestProcessor by web
context |
private ScreenFlowManager |
getScreenFlowManager()
auxiliary method that instances an unique ScreenFlowManager by web
context |
void |
init()
unique instances of RequestProcessor and ScreenFlowManager by web
context |
Methods inherited from class javax.servlet.http.HttpServlet |
, doDelete, doHead, doOptions, doPut, doTrace, getAllDeclaredMethods, getLastModified, maybeSetLastModified, 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, registerNatives, toString, wait, wait, wait |
debug
private Debug debug
MainServlet
public MainServlet()
init
public void init()
- unique instances of RequestProcessor and ScreenFlowManager by web
context
- Overrides:
init
in class javax.servlet.GenericServlet
doPost
public void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
- process post request from user
- Overrides:
doPost
in class javax.servlet.http.HttpServlet
- Parameters:
request
- HTTP user requestresponse
- HTTP response- Throws:
java.io.IOException
- javax.servlet.ServletException
-
doGet
public void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
- process get request from user
- Overrides:
doGet
in class javax.servlet.http.HttpServlet
- Parameters:
request
- HTTP user requestresponse
- HTTP response- Throws:
java.io.IOException
- javax.servlet.ServletException
-
getRequestProcessor
private RequestProcessor getRequestProcessor()
- auxiliary method that instances an unique RequestProcessor by web
context
- Returns:
- The requestProcessor value
getScreenFlowManager
private ScreenFlowManager getScreenFlowManager()
- auxiliary method that instances an unique ScreenFlowManager by web
context
- Returns:
- The screenFlowManager value
debuggingMainServlet
private void debuggingMainServlet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
- debugging MainServlet
- Parameters:
request
- HTTP requestresponse
- HTTP responser
captureCollectionsVariables
private void captureCollectionsVariables(javax.servlet.http.HttpServletRequest request)
- captures Collections web session variables
- Parameters:
request
- HTTP request
controlTimeout
private boolean controlTimeout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
- control time out in lettertemplate ear
- Parameters:
request
- HTTP requestresponse
- HTTP response- Returns:
- true if timeout; false otherwise
- Throws:
java.io.IOException
- javax.servlet.ServletException
-
captureEnvironmentVariables
private void captureEnvironmentVariables(javax.servlet.http.HttpServletRequest request)
- actions for a new session:
capture Environment variables,
set web session variables,
clean temporal directories
- Parameters:
request
- HTTP request