|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
au.com.whitesquare.waf.servlet.BaseControllerServlet
Last Modified $Date: 2006/04/26 11:04:17 $
| Constructor Summary | |
BaseControllerServlet()
|
|
| Method Summary | |
void |
destroy()
|
protected void |
doGet(HttpServletRequest req,
HttpServletResponse resp)
The doGet is just re-directed to the doPost. |
protected void |
doPost(HttpServletRequest req,
HttpServletResponse resp)
The doPost does all of the work parsing the parameters, retreiving the command, then dispatching the repsonse. |
protected CommandKeyResolver |
getCommandKeyResolver()
Returns the initalised Command Key Resolver. |
protected CommandResolver |
getCommandResolver()
|
protected abstract String |
getLog4jFileName(ServletConfig config)
This method is used to retreive the log4j config file that will be used to log debug output from this application. |
protected ParameterParser |
getParameterParser()
|
protected void |
getParameters(WAFRequest wafRequest,
HttpServletRequest request)
Gets all parameters send by the client. |
void |
init(ServletConfig config)
Description of the Method |
protected void |
initLog4j(ServletConfig config)
|
protected Response |
processCommand(BaseCommand command,
WAFRequest params,
HttpServletRequest req,
HttpServletResponse resp)
|
protected void |
resolveCommandKey(WAFRequest wafRequest,
HttpServletRequest req)
Resolves the request entity's key from the request information. |
| Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
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 |
public BaseControllerServlet()
| Method Detail |
public void init(ServletConfig config)
throws ServletException
config - Description of the Parameter
ServletException - Description of the Exceptionprotected final void initLog4j(ServletConfig config)
protected abstract String getLog4jFileName(ServletConfig config)
<context-param> <param-name>LOG4J_PATH</param-name> <param-value>/WEB-INF/conf/log4j.properties</param-value> </context-param>And then an implementation of the method as follows
String fileName = config.getServletContext().getInitParameter("LOG4J_PATH");
fileName = config.getServletContext().getRealPath(fileName);
return fileName;
protected final void doGet(HttpServletRequest req,
HttpServletResponse resp)
throws ServletException,
IOException
ServletException
IOExceptionHttpServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
protected final void doPost(HttpServletRequest req,
HttpServletResponse resp)
throws ServletException,
IOException
ServletException
IOExceptionHttpServlet.doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
protected final Response processCommand(BaseCommand command,
WAFRequest params,
HttpServletRequest req,
HttpServletResponse resp)
command - params - req - resp -
protected final void getParameters(WAFRequest wafRequest,
HttpServletRequest request)
throws ParameterException
wafRequest - request -
ParameterException
protected final void resolveCommandKey(WAFRequest wafRequest,
HttpServletRequest req)
wafRequest - req - protected CommandKeyResolver getCommandKeyResolver()
protected ParameterParser getParameterParser()
protected CommandResolver getCommandResolver()
public void destroy()
Servlet.destroy()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||