| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.struts.action.RequestProcessor
org.apache.struts.tiles.TilesRequestProcessor
public class 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:
processForwardConfig(HttpServletRequest,HttpServletResponse,ForwardConfig)internalModuleRelativeForward(String, HttpServletRequest , HttpServletResponse)internalModuleRelativeInclude(String, HttpServletRequest , HttpServletResponse)
| Field Summary | |
|---|---|
| protected  DefinitionsFactory | definitionsFactoryDefinitions factory. | 
| protected static Log | logCommons Logging instance. | 
| Fields inherited from class org.apache.struts.action.RequestProcessor | 
|---|
| actions, INCLUDE_PATH_INFO, INCLUDE_SERVLET_PATH, moduleConfig, servlet | 
| Constructor Summary | |
|---|---|
| TilesRequestProcessor() | |
| 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)Deprecated. use processTilesDefinition(definitionName, request, response) instead. This method will be removed in a version after 1.3.0. | 
| protected  boolean | processTilesDefinition(String definitionName,
                       HttpServletRequest request,
                       HttpServletResponse response)Process a Tile definition name. | 
| Methods inherited from class org.apache.struts.action.RequestProcessor | 
|---|
| destroy, doInclude, getInternal, getServletContext, process, processActionCreate, processActionForm, processActionPerform, processCachedMessages, processContent, processException, processForward, processInclude, processLocale, processMapping, processMultipart, processNoCache, processPath, processPopulate, processPreprocess, processRoles, processValidate | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected DefinitionsFactory definitionsFactory
protected static Log log
| Constructor Detail | 
|---|
public TilesRequestProcessor()
| Method Detail | 
|---|
public void init(ActionServlet servlet,
                 ModuleConfig moduleConfig)
          throws ServletException
init in class RequestProcessorservlet - The ActionServlet we are associated with.moduleConfig - The ModuleConfig we are associated with.
ServletException - If an error occurs during initialization.
protected void initDefinitionsMapping()
                               throws ServletException
ServletException
protected boolean processTilesDefinition(String definitionName,
                                         boolean contextRelative,
                                         HttpServletRequest request,
                                         HttpServletResponse response)
                                  throws IOException,
                                         ServletException
definitionName
 as a definition name.
 It returns true if a definition has been processed, or
 false otherwise.
 This method is deprecated; the method without the
 contextRelative parameter should be used instead.
definitionName - Definition name to insert.contextRelative - Is the definition marked contextRelative ?request - Current page request.response - Current page response.
true if the method has processed uri as a
 definition name, false otherwise.
IOException
ServletException
protected boolean processTilesDefinition(String definitionName,
                                         HttpServletRequest request,
                                         HttpServletResponse response)
                                  throws IOException,
                                         ServletException
definitionName
 as a definition name.
 It returns true if a definition has been processed, or
 false otherwise.
definitionName - Definition name to insert.request - Current page request.response - Current page response.
true if the method has processed uri as a
 definition name, false otherwise.
IOException
ServletException
protected void doForward(String uri,
                         HttpServletRequest request,
                         HttpServletResponse response)
                  throws IOException,
                         ServletException
doForward in class RequestProcessoruri - Uri or Definition name to forward.request - Current page request.response - Current page response.
IOException - if an input/output error occurs
ServletException - if a servlet exception occurs
protected void processForwardConfig(HttpServletRequest request,
                                    HttpServletResponse response,
                                    ForwardConfig forward)
                             throws IOException,
                                    ServletException
processForwardConfig in class RequestProcessorrequest - The servlet request we are processing.response - The servlet response we are creating.forward - The ActionForward controlling where we go next.
IOException - if an input/output error occurs.
ServletException - if a servlet exception occurs.
protected void internalModuleRelativeForward(String uri,
                                             HttpServletRequest request,
                                             HttpServletResponse response)
                                      throws IOException,
                                             ServletException
internalModuleRelativeForward in class RequestProcessoruri - Module-relative URI to forward to.request - Current page request.response - Current page response.
IOException - if an input/output error occurs
ServletException - if a servlet exception occurs
protected void internalModuleRelativeInclude(String uri,
                                             HttpServletRequest request,
                                             HttpServletResponse response)
                                      throws IOException,
                                             ServletException
internalModuleRelativeInclude in class RequestProcessoruri - Module-relative URI to forward to.request - Current page request.response - Current page response.
IOException - if an input/output error occurs
ServletException - if a servlet exception occurspublic DefinitionsFactory getDefinitionsFactory()
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||