|
WebLogic Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.servlet.GenericServlet | +--javax.servlet.http.HttpServlet | +--com.bea.web.ControllerServlet
A servlet that delegates user input (in the HTTP request object) from an HTML
form to a handler method on a com.bea.web.RequestHandler
instance. The com.bea.web.RequestHandler
is stored in
the session under the key "handler". This class uses reflection to determine
which method to invoke on the request handler. This provides a simple MVC
architecture where this object serves as the controller component and the
request handler serves as the model component. Obviously, the HTML/JSP pages
provide the view.
Prior to invoking the form handling method on the request handler, this
class performs a coarse-grained validation of the input fields.
Constructor Summary | |
ControllerServlet()
|
Method Summary | |
protected java.lang.String |
debug(javax.servlet.http.HttpServletRequest request)
|
protected void |
debugCookies(java.io.PrintStream stream,
javax.servlet.http.HttpServletRequest request)
|
protected void |
debugRequest(java.io.PrintStream stream,
javax.servlet.http.HttpServletRequest request)
|
protected void |
debugRequestHeader(java.io.PrintStream stream,
javax.servlet.http.HttpServletRequest request)
|
protected void |
debugRequestInfo(java.io.PrintStream stream,
javax.servlet.http.HttpServletRequest request)
|
protected void |
debugRequestParameters(java.io.PrintStream stream,
javax.servlet.http.HttpServletRequest request)
|
protected void |
debugSession(java.io.PrintStream stream,
javax.servlet.http.HttpSession session)
|
protected void |
doAction(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Used to invoke a method on the request handler |
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected java.lang.String |
getExceptionInfo(java.lang.Throwable t)
|
protected RequestHandler |
getRequestHandler(javax.servlet.http.HttpServletRequest request)
Retrieves a RequestHandler from the session; if one is not
available in the session, a new instance is created. |
void |
init(javax.servlet.ServletConfig config)
|
protected void |
loadRequestHandler(javax.servlet.http.HttpServletRequest request)
Used to load the request handler. |
protected java.lang.String |
processRequest(java.lang.String strDo,
javax.servlet.http.HttpServletRequest request,
RequestHandler handler,
java.lang.String strUnvalidatedRequestParameters)
Invokes the strDo method on the handler instance. |
protected boolean |
validateRequest(java.lang.String strDo,
javax.servlet.http.HttpServletRequest request,
RequestHandler handler,
java.lang.StringBuffer sbUnvalidatedRequestParameters)
|
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 |
public ControllerServlet()
Method Detail |
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
protected void loadRequestHandler(javax.servlet.http.HttpServletRequest request) throws javax.servlet.ServletException
protected void doAction(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
protected java.lang.String processRequest(java.lang.String strDo, javax.servlet.http.HttpServletRequest request, RequestHandler handler, java.lang.String strUnvalidatedRequestParameters) throws javax.servlet.ServletException
strDo
method on the handler
instance.
protected boolean validateRequest(java.lang.String strDo, javax.servlet.http.HttpServletRequest request, RequestHandler handler, java.lang.StringBuffer sbUnvalidatedRequestParameters) throws java.io.UnsupportedEncodingException
protected RequestHandler getRequestHandler(javax.servlet.http.HttpServletRequest request) throws javax.servlet.ServletException
RequestHandler
from the session; if one is not
available in the session, a new instance is created. A
RequestHandler
is responsible for "handling" user input from
HTML forms.protected final java.lang.String getExceptionInfo(java.lang.Throwable t)
protected java.lang.String debug(javax.servlet.http.HttpServletRequest request)
protected void debugRequest(java.io.PrintStream stream, javax.servlet.http.HttpServletRequest request)
protected void debugRequestHeader(java.io.PrintStream stream, javax.servlet.http.HttpServletRequest request)
protected void debugRequestInfo(java.io.PrintStream stream, javax.servlet.http.HttpServletRequest request)
protected void debugRequestParameters(java.io.PrintStream stream, javax.servlet.http.HttpServletRequest request)
protected void debugCookies(java.io.PrintStream stream, javax.servlet.http.HttpServletRequest request)
protected void debugSession(java.io.PrintStream stream, javax.servlet.http.HttpSession session)
|
WebLogic Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |