Home » Struts-1.3.10 » org.apache.struts » tiles » [javadoc | source]
org.apache.struts.tiles
public class: TilesRequestProcessor [javadoc | source]
java.lang.Object
   org.apache.struts.action.RequestProcessor
      org.apache.struts.tiles.TilesRequestProcessor

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:

Field Summary
protected  DefinitionsFactory definitionsFactory    Definitions factory. 
protected static  Log log    Commons Logging instance. 
Method from org.apache.struts.tiles.TilesRequestProcessor Summary:
doForward,   getDefinitionsFactory,   init,   initDefinitionsMapping,   internalModuleRelativeForward,   internalModuleRelativeInclude,   processForwardConfig,   processTilesDefinition
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.struts.tiles.TilesRequestProcessor Detail:
 protected  void doForward(String uri,
    HttpServletRequest request,
    HttpServletResponse response) throws IOException, ServletException 
    Do a forward using request dispatcher. Uri is a valid uri. If response has already been commited, do an include instead.
 public DefinitionsFactory getDefinitionsFactory() 
    Get associated definition factory.
 public  void init(ActionServlet servlet,
    ModuleConfig moduleConfig) throws ServletException 
    Initialize this request processor instance.
 protected  void initDefinitionsMapping() throws ServletException 
    Read component instance mapping configuration file. This is where we read files properties.
 protected  void internalModuleRelativeForward(String uri,
    HttpServletRequest request,
    HttpServletResponse response) throws IOException, ServletException 
    Catch the call to a module relative forward. If the specified uri is a tiles definition name, insert it. Otherwise, parent processing is called. Do a module relative forward to specified uri using request dispatcher. Uri is relative to the current module. The real uri is computed by prefixing the module name. This method is used internally and is not part of the public API. It is advised to not use it in subclasses.
 protected  void internalModuleRelativeInclude(String uri,
    HttpServletRequest request,
    HttpServletResponse response) throws IOException, ServletException 
    Do a module relative include to specified uri using request dispatcher. Uri is relative to the current module. The real uri is computed by prefixing the module name. This method is used internally and is not part of the public API. It is advised to not use it in subclasses.
 protected  void processForwardConfig(HttpServletRequest request,
    HttpServletResponse response,
    ForwardConfig forward) throws IOException, ServletException 
    Overloaded method from Struts' RequestProcessor. Forward or redirect to the specified destination by the specified mechanism. This method catches the Struts' actionForward call. It checks if the actionForward is done on a Tiles definition name. If true, process the definition and insert it. If false, call the original parent's method.
 protected boolean processTilesDefinition(String definitionName,
    boolean contextRelative,
    HttpServletRequest request,
    HttpServletResponse response) throws IOException, ServletException 
    Process a Tile definition name. This method tries to process the parameter 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.