|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.struts.action.RequestProcessor | +--org.apache.struts.faces.application.FacesRequestProcessor
Concrete implementation of RequestProcessor
that
implements the standard Struts request processing lifecycle on a
request that was received as a FormEvent
by our
associated application handler. It replaces the request processor
instance normally configured by Struts, so it must support non-Faces
requests as well.
Field Summary | |
protected static org.apache.commons.logging.Log |
log
The log instance for this class. |
Fields inherited from class org.apache.struts.action.RequestProcessor |
actions, appConfig, INCLUDE_PATH_INFO, INCLUDE_SERVLET_PATH, moduleConfig, servlet |
Constructor Summary | |
FacesRequestProcessor()
|
Method Summary | |
protected void |
doForward(java.lang.String uri,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Do a forward to specified uri using request dispatcher. |
protected void |
doInclude(java.lang.String uri,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Do a include to specified uri using request dispatcher. |
protected java.lang.String |
processPath(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Identify and return the path component (from the request URI for a non-Faces request, or from the form event for a Faces request) that we will use to select an ActionMapping to dispatch with. |
protected void |
processPopulate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.apache.struts.action.ActionForm form,
org.apache.struts.action.ActionMapping mapping)
Populate the properties of the specified ActionForm
instance from the request parameters included with this request,
IF this is a non-Faces request. |
private void |
selectTree(javax.faces.context.FacesContext context,
java.lang.String uri)
Select the response component tree that corresponds to the specified URI, which is being forwarded to or included. |
Methods inherited from class org.apache.struts.action.RequestProcessor |
destroy, getDebug, getInternal, getServletContext, init, internalModuleRelativeForward, internalModuleRelativeInclude, log, log, process, processActionCreate, processActionForm, processActionForward, processActionPerform, processContent, processException, processForward, processForwardConfig, processInclude, processLocale, processMapping, processMultipart, processNoCache, processPreprocess, processRoles, processValidate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static org.apache.commons.logging.Log log
The log instance for this class.
Constructor Detail |
public FacesRequestProcessor()
Method Detail |
protected void doForward(java.lang.String uri, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
Do a forward to specified uri using request dispatcher. This method is used by all internal method needing to transfer control to a new resource to create the response. For a Faces request, select the new response component tree in addition to the standard processing.
doForward
in class org.apache.struts.action.RequestProcessor
uri
- Uri or Definition name to forwardrequest
- Current page requestresponse
- Current page response
java.io.IOException
javax.servlet.ServletException
protected void doInclude(java.lang.String uri, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
Do a include to specified uri using request dispatcher. This method is used by all internal method needing to transfer control to a new resource to create the response. For a Faces request, select the new response component tree in addition to the standard processing.
doInclude
in class org.apache.struts.action.RequestProcessor
uri
- Uri or Definition name to forwardrequest
- Current page requestresponse
- Current page response
java.io.IOException
javax.servlet.ServletException
protected java.lang.String processPath(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
Identify and return the path component (from the request URI for a
non-Faces request, or from the form event for a Faces request)
that we will use to select an ActionMapping to dispatch with.
If no such path can be identified, create an error response and return
null
.
processPath
in class org.apache.struts.action.RequestProcessor
request
- The servlet request we are processingresponse
- The servlet response we are creating
java.io.IOException
- if an input/output error occursprotected void processPopulate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.struts.action.ActionForm form, org.apache.struts.action.ActionMapping mapping) throws javax.servlet.ServletException
Populate the properties of the specified ActionForm
instance from the request parameters included with this request,
IF this is a non-Faces request. For a Faces request,
this will have already been done by the Update Model Values
phase of the request processing lifecycle, so all we have to do is
recognize whether the request was cancelled or not.
processPopulate
in class org.apache.struts.action.RequestProcessor
request
- The servlet request we are processingresponse
- The servlet response we are creatingform
- The ActionForm instance we are populatingmapping
- The ActionMapping we are using
javax.servlet.ServletException
- if thrown by RequestUtils.populate()private void selectTree(javax.faces.context.FacesContext context, java.lang.String uri)
Select the response component tree that corresponds to the specified URI, which is being forwarded to or included.
context
- FacesContext for the request we are processinguri
- Context-relative URI of the new resource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |