Class TilesPreProcessor
- All Implemented Interfaces:
 Command<ServletActionContext>
This class will never have any effect on the chain unless a
 TilesDefinitionFactory can be found; however it does not consider
 the absence of a definition factory to be a fatal error; the command simply
 returns false and lets the chain continue.
To initialize the TilesDefinitionFactory, use
 org.apache.struts.chain.commands.legacy.TilesPlugin. This class is a
 simple extension to org.apache.struts.tiles.TilesPlugin which simply
 does not interfere with your choice of RequestProcessor
 implementation.
- 
Field Summary
Fields inherited from interface org.apache.commons.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoForward(ServletActionContext context, String uri) Do an include of specified URI using aRequestDispatcher.protected voiddoInclude(ServletActionContext context, String uri) Do an include of specified URI using aRequestDispatcher.booleanexecute(ServletActionContext sacontext) If the currentForwardConfigis using "tiles", perform necessary pre-processing to set up theTilesContextand substitute a newForwardConfigwhich is understandable to aRequestDispatcher. 
- 
Constructor Details
- 
TilesPreProcessor
public TilesPreProcessor() 
 - 
 - 
Method Details
- 
execute
If the currentForwardConfigis using "tiles", perform necessary pre-processing to set up theTilesContextand substitute a newForwardConfigwhich is understandable to aRequestDispatcher.Note that if the command finds a previously existing
ComponentContextin the request, then it infers that it has been called from within another tile, so instead of changing theForwardConfigin the chainContext, the command usesRequestDispatcherto include the tile, and returns true, indicating that the processing chain is complete.- Specified by:
 executein interfaceCommand<ServletActionContext>- Parameters:
 sacontext- TheContextfor the current request- Returns:
 falsein most cases, but true if we determine that we're processing in "include" mode.- Throws:
 Exception
 - 
doInclude
protected void doInclude(ServletActionContext context, String uri) throws IOException, ServletException Do an include of specified URI using aRequestDispatcher.- Parameters:
 context- a chain servlet/web contexturi- Context-relative URI to include- Throws:
 IOExceptionServletException
 - 
doForward
protected void doForward(ServletActionContext context, String uri) throws IOException, ServletException Do an include of specified URI using aRequestDispatcher.- Parameters:
 context- a chain servlet/web contexturi- Context-relative URI to include- Throws:
 IOExceptionServletException
 
 -