| java.lang.Object org.apache.struts.action.RequestProcessor org.apache.struts.tiles.TilesRequestProcessor
All known Subclasses: org.apache.struts.faces.application.FacesTilesRequestProcessor,
TilesRequestProcessor | public class TilesRequestProcessor extends RequestProcessor (Code) | | 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 |
Method Summary | |
protected void | doForward(String uri, HttpServletRequest request, HttpServletResponse response) Do a forward using request dispatcher.
Uri is a valid uri. | public DefinitionsFactory | getDefinitionsFactory() Get associated definition factory. | public 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.
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. | protected void | internalModuleRelativeInclude(String uri, HttpServletRequest request, HttpServletResponse response) Do a module relative include to specified uri using request dispatcher.
Uri is relative to the current module. | protected void | processForwardConfig(HttpServletRequest request, HttpServletResponse response, ForwardConfig forward) Overloaded method from Struts' RequestProcessor.
Forward or redirect to the specified destination by the specified
mechanism.
This method catches the Struts' actionForward call. | protected boolean | processTilesDefinition(String definitionName, boolean contextRelative, HttpServletRequest request, HttpServletResponse response) 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.
This method is deprecated; the method without the
contextRelative parameter should be used instead.
Parameters: definitionName - Definition name to insert. Parameters: contextRelative - Is the definition marked contextRelative ? Parameters: request - Current page request. Parameters: response - Current page response. | protected boolean | processTilesDefinition(String definitionName, HttpServletRequest request, HttpServletResponse response) 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.
Parameters: definitionName - Definition name to insert. Parameters: request - Current page request. Parameters: response - Current page response. |
log | protected static Log log(Code) | | Commons Logging instance.
|
doForward | protected void doForward(String uri, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code) | | Do a forward using request dispatcher.
Uri is a valid uri. If response has already been commited, do an include
instead.
Parameters: uri - Uri or Definition name to forward. Parameters: request - Current page request. Parameters: response - Current page response. |
init | public void init(ActionServlet servlet, ModuleConfig moduleConfig) throws ServletException(Code) | | Initialize this request processor instance.
Parameters: servlet - The ActionServlet we are associated with. Parameters: moduleConfig - The ModuleConfig we are associated with. throws: ServletException - If an error occurs during initialization. |
initDefinitionsMapping | protected void initDefinitionsMapping() throws ServletException(Code) | | Read component instance mapping configuration file.
This is where we read files properties.
|
internalModuleRelativeForward | protected void internalModuleRelativeForward(String uri, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code) | | 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.
Parameters: uri - Module-relative URI to forward to. Parameters: request - Current page request. Parameters: response - Current page response. since: Struts 1.1 |
internalModuleRelativeInclude | protected void internalModuleRelativeInclude(String uri, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code) | | 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.
Parameters: uri - Module-relative URI to forward to. Parameters: request - Current page request. Parameters: response - Current page response. since: Struts 1.1 |
processForwardConfig | protected void processForwardConfig(HttpServletRequest request, HttpServletResponse response, ForwardConfig forward) throws IOException, ServletException(Code) | | 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.
Parameters: request - The servlet request we are processing. Parameters: response - The servlet response we are creating. Parameters: forward - The ActionForward controlling where we go next. exception: IOException - if an input/output error occurs. exception: ServletException - if a servlet exception occurs. |
processTilesDefinition | protected boolean processTilesDefinition(String definitionName, boolean contextRelative, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code) | | 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.
This method is deprecated; the method without the
contextRelative parameter should be used instead.
Parameters: definitionName - Definition name to insert. Parameters: contextRelative - Is the definition marked contextRelative ? Parameters: request - Current page request. Parameters: response - Current page response. true if the method has processed uri as adefinition name, false otherwise. |
processTilesDefinition | protected boolean processTilesDefinition(String definitionName, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code) | | 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.
Parameters: definitionName - Definition name to insert. Parameters: request - Current page request. Parameters: response - Current page response. true if the method has processed uri as adefinition name, false otherwise. |
Methods inherited from org.apache.struts.action.RequestProcessor | public void destroy()(Code)(Java Doc) protected void doForward(String uri, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code)(Java Doc) protected void doInclude(String uri, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code)(Java Doc) protected MessageResources getInternal()(Code)(Java Doc) protected ServletContext getServletContext()(Code)(Java Doc) public void init(ActionServlet servlet, ModuleConfig moduleConfig) throws ServletException(Code)(Java Doc) protected void internalModuleRelativeForward(String uri, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code)(Java Doc) protected void internalModuleRelativeInclude(String uri, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code)(Java Doc) public void process(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code)(Java Doc) protected Action processActionCreate(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws IOException(Code)(Java Doc) protected ActionForm processActionForm(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping)(Code)(Java Doc) protected ActionForward processActionPerform(HttpServletRequest request, HttpServletResponse response, Action action, ActionForm form, ActionMapping mapping) throws IOException, ServletException(Code)(Java Doc) protected void processCachedMessages(HttpServletRequest request, HttpServletResponse response)(Code)(Java Doc) protected void processContent(HttpServletRequest request, HttpServletResponse response)(Code)(Java Doc) protected ActionForward processException(HttpServletRequest request, HttpServletResponse response, Exception exception, ActionForm form, ActionMapping mapping) throws IOException, ServletException(Code)(Java Doc) protected boolean processForward(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws IOException, ServletException(Code)(Java Doc) protected void processForwardConfig(HttpServletRequest request, HttpServletResponse response, ForwardConfig forward) throws IOException, ServletException(Code)(Java Doc) protected boolean processInclude(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws IOException, ServletException(Code)(Java Doc) protected void processLocale(HttpServletRequest request, HttpServletResponse response)(Code)(Java Doc) protected ActionMapping processMapping(HttpServletRequest request, HttpServletResponse response, String path) throws IOException(Code)(Java Doc) protected HttpServletRequest processMultipart(HttpServletRequest request)(Code)(Java Doc) protected void processNoCache(HttpServletRequest request, HttpServletResponse response)(Code)(Java Doc) protected String processPath(HttpServletRequest request, HttpServletResponse response) throws IOException(Code)(Java Doc) protected void processPopulate(HttpServletRequest request, HttpServletResponse response, ActionForm form, ActionMapping mapping) throws ServletException(Code)(Java Doc) protected boolean processPreprocess(HttpServletRequest request, HttpServletResponse response)(Code)(Java Doc) protected boolean processRoles(HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws IOException, ServletException(Code)(Java Doc) protected boolean processValidate(HttpServletRequest request, HttpServletResponse response, ActionForm form, ActionMapping mapping) throws IOException, ServletException, InvalidCancelException(Code)(Java Doc)
|
|
|