org.apache.struts.tiles
public class TilesRequestProcessor extends RequestProcessor
RequestProcessor contains the processing logic that the Struts controller servlet performs as it receives each servlet request from the container.
This processor subclasses the Struts RequestProcessor in order to intercept calls to forward or include. When such calls are done, the Tiles processor checks if the specified URI is a definition name. If true, the definition is retrieved and included. If false, the original URI is included or a forward is performed.
Actually, catching is done by overloading the following methods:
Since: Struts 1.1
Field Summary | |
---|---|
protected DefinitionsFactory | definitionsFactory
Definitions factory. |
protected static Log | log
Commons Logging instance. |
Method Summary | |
---|---|
protected void | doForward(String uri, HttpServletRequest request, HttpServletResponse response)
Do a forward using request dispatcher.
|
DefinitionsFactory | getDefinitionsFactory()
Get associated definition factory. |
void | init(ActionServlet servlet, ModuleConfig moduleConfig)
Initialize this request processor instance.
|
protected void | initDefinitionsMapping()
Read component instance mapping configuration file.
|
protected void | internalModuleRelativeForward(String uri, HttpServletRequest request, HttpServletResponse response)
Catch the call to a module relative forward.
|
protected void | internalModuleRelativeInclude(String uri, HttpServletRequest request, HttpServletResponse response)
Do a module relative include to specified uri using request dispatcher.
|
protected void | processForwardConfig(HttpServletRequest request, HttpServletResponse response, ForwardConfig forward)
Overloaded method from Struts' RequestProcessor.
|
protected boolean | processTilesDefinition(String definitionName, boolean contextRelative, HttpServletRequest request, HttpServletResponse response)
Process a Tile definition name.
|
Parameters: uri Uri or Definition name to forward. request Current page request. response Current page response.
Parameters: servlet The ActionServlet we are associated with. moduleConfig The ModuleConfig we are associated with.
Throws: ServletException If an error occurs during initialization.
Parameters: uri Module-relative URI to forward to. request Current page request. response Current page response.
Since: Struts 1.1
Parameters: uri Module-relative URI to forward to. request Current page request. response Current page response.
Since: Struts 1.1
Parameters: request The servlet request we are processing. response The servlet response we are creating. forward The ActionForward controlling where we go next.
Throws: IOException if an input/output error occurs. ServletException if a servlet exception occurs.
definitionName
as a definition name.
It returns true
if a definition has been processed, or false
otherwise.
Parameter contextRelative
is not used in this implementation.
Parameters: definitionName Definition name to insert. contextRelative Is the definition marked contextRelative ? request Current page request. response Current page response.
Returns: true
if the method has processed uri as a definition name, false
otherwise.