Org. Apache. Struts. Tiles
Class tilesrequestprocessor
Java. Lang. Object
|
+ -- Org. Apache. Struts. Action. requestprocessor
|
+ -- Org. Apache. Struts. Tiles. tilesrequestprocessor
--------------------------------------------------------------------------------
Public class tilesrequestprocessor extends requestprocessor
Requestprocessor contains a set of processing logic: when the container receives each Servlet request, it can process like the struts controller servlet.
Tilesrequestprocessor inherits requestprocessor and can intercept forward or include. When the specified URI is a defined name, it can detect. If so, this definition is retrieved and included. If false, the original URI is encoded or forward for execution.
In fact, you only need to reload the following methods to perform catching.
Processforwardconfig (httpservletrequest, httpservletresponse, forwardconfig)
Internalmodulerelativeforward (string, httpservletrequest, httpservletresponse)
Internalmodulerelativeinclude (string, httpservletrequest, httpservletresponse)
Since:
Struts 1.1
Member variables |
protected DefinitionsFactory |
definitionsFactory Define the factory. |
protected static org.apache.commons.logging.Log |
log Commons logging instance. |
The domain inherits from the org. Apache. Struts. Action class. Requestprocessor |
actions, INCLUDE_PATH_INFO, INCLUDE_SERVLET_PATH, moduleConfig, servlet |
Constructor |
TilesRequestProcessor()
|
Member Functions |
protected void |
doForward(java.lang.String uri, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Forward requests for forward |
DefinitionsFactory |
getDefinitionsFactory() Get the defined factory. |
void |
init(ActionServlet servlet, ModuleConfig moduleConfig) Initialization |
protected void |
initDefinitionsMapping() Read the component case ing configuration file. |
protected void |
internalModuleRelativeForward(java.lang.String uri, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Catch the call to a module relative forward |
protected void |
internalModuleRelativeInclude(java.lang.String uri, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) A module relative includes a request dispatcher for a specified Uri. |
protected void |
processForwardConfig(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ForwardConfig forward) The overload method is removed from the high-eye requestprocessor. |
protected boolean |
processTilesDefinition(java.lang.String definitionName, boolean contextRelative, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Process a tile definition name. |
The method inherits from the org. Apache. Struts. Action class. Requestprocessor |
destroy, doInclude, getInternal, getServletContext, log, log, process, processActionCreate, processActionForm, processActionPerform, processCachedMessages, processContent, processException, processForward, processInclude, processLocale, processMapping, processMultipart, processNoCache, processPath, processPopulate, processPreprocess, processRoles, processValidate |
The method inherits from the java. Lang. Object Class. |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
Definitionsfactory
Protected definitionsfactoryDefinitionsfactory
-
Define the factory.
Logs
Protected static org. Apache. commons. Logging. LogLogs
-
Commons logging instance.
Tilesrequestprocessor
PublicTilesrequestprocessor ()
Init
Public emptyInit (Actionservlet servlet, moduleconfig moduleconfi g) Throw javax. servlet. servletexception
-
Initialize This processor case.
-
-
Excessive load:
-
init
In
RequestProcessor
-
-
Parameters:
-
servlet
-Actionservlet is associated with each other.
-
moduleConfig
-Moduleconfig is associated with each other.
-
Throw:
-
javax.servlet.ServletException
-If the error occurs during initialization.
Initdefinitionsmapping
Protected BlankInitdefinitionsmapping ()Throwing javax. servlet. servletexception
-
Read the component instance ing configuration file. This is where we read the file product.
Processtilesdefinition
Protected BooleanProcesstilesdefinition (Java. Lang. String definitionname,Boolean contextrelative, javax. servlet. http. httpservletrequest request, javax. servlet. http. httpservletresponse response) Throw java. Io. ioexception, javax. servlet. servletexception
-
Process tile definition name. This method is used to process this parameter.
definitionName
As a definite name. It returns
true
If the definition is processed, or
false
Otherwise. Parameters
contextRelative
Not used here.
-
-
Parameters:
-
definitionName
-Define name insert.
-
contextRelative
-Is this definition mark contextrelative?
-
request
-Requests for the current period.
-
response
-Current response time.
-
Regression:
-
true
If this method processes the URI as the definition name,
false
Otherwise.
Doforward
Protected BlankDoforward (Java. Lang. String Uri,Javax. servlet. http. httpservletrequest request, javax. servlet. http. httpservletresponse response) Throw java. Io. ioexception, javax. servlet. servletexception
-
Make a new request dispatcher. Uri is a valid Uri. If the response is already commited, include it instead.
-
-
Excessive load:
-
doForward
In
RequestProcessor
-
-
Parameters:
-
uri
-Uri or definition name approval.
-
request
-Please request for the current period.
-
response
-Current Period response.
Processforwardconfig
Protected BlankProcessforwardconfig (javax. servlet. http. httpservletrequest request,Javax. servlet. http. httpservletresponse response, forwardconfig will) Throw java. Io. ioexception, javax. servlet. servletexception
-
The overload method is removed from the high-looking requestprocessor. The forwarding or redirection is based on the specified mechanism for the specified destination. This method is used to catch the actionforward call number. It checks if actionforward is done in the tile definition name. If it is true, process the definition and insert it. If it is false, it is called the method of the original parent.
-
-
Excessive load:
-
processForwardConfig
In
RequestProcessor
-
-
Parameters:
-
request
-The Servlet request we are processing.
-
response
-The servlet response we are creating.
-
forward
-Actionforward controls the places where we go.
-
Throw:
-
java.io.IOException
-If an input-output error occurs.
-
javax.servlet.ServletException
-If the servlet exception occurs.
Internalmodulerelativeforward
Protected BlankInternalmodulerelativeforward (Java. Lang. String Uri,Javax. servlet. http. httpservletrequest request, javax. servlet. http. httpservletresponse response) Throw java. Io. ioexception, javax. servlet. servletexception
-
Capture the call number to move the module forward. If the specified URI is a tile definition name, insert it. Otherwise, the parent will call it. As a module, the relative will use the request dispatcher for the specified URI in the future. Uri is relative to the current module. The actual URI is the name of the computing module with a prefix.
This method is used internally and is not part of the public API. It is advised not to use it in the subclass.
-
-
Excessive load:
-
internalModuleRelativeForward
In
RequestProcessor
-
-
Parameters:
-
uri
-Module-relative URI Batch Transfer
-
request
-Requests for the current period.
-
response
-Current Period response.
-
Since then:
-
Stride 1.1
Internalmodulerelativeinclude
Protected BlankInternalmodulerelativeinclude (Java. Lang. String Uri,Javax. servlet. http. httpservletrequest request, javax. servlet. http. httpservletresponse response) Throw java. Io. ioexception, javax. servlet. servletexception
-
A module relative includes a request dispatcher for a specified Uri. Uri is relative to the current module. The actual URI is the name of the computing module with a prefix.
This method is used internally and is not part of the public API. It is advised not to use it in the subclass.
-
-
Excessive load:
-
internalModuleRelativeInclude
In
RequestProcessor
-
-
Parameters:
-
uri
-The module is graded against the URI.
-
request
-Requests for the current period.
-
response
-Current Period response.
-
Since then:
-
Stride 1.1
Getdefinitionsfactory
Public definitionsfactoryGetdefinitionsfactory ()
-
Get the associated definition factory.