org.apache.struts.tiles
Class ActionComponentServlet
public class ActionComponentServlet
Action Servlet to be used with Tiles and Struts 1.0.x.
For Struts 1.1, use TilesPlugin and eventualy TilesRequestProcessor.
This servlet extends struts one. It adds channels and screens dispatching
capabilities.
We overide all methods that do request forward (i.e. 'processActionForward'
and 'processValidate') in order to call a new method performing forward.
In fact, we copy methods to overide, and change lines doing forward which
now call 'processForward()'. Rest of the method is unchanged.
This new method could now be overiden in order to dispatch request before
forwarding.
Compliant to ActionServlet from struts 2001/06/25 00:02:27
config , configDigester , convertNull , dataSources , debug , internal , internalName , log , processor , registrations , servletMapping , servletName |
protected void | doForward(String uri, HttpServletRequest request, HttpServletResponse response) - Do a forward, and eventually catch uri containing Tiles definition.
|
void | init() - Init method.
|
void | initComponentDefinitionsMapping() - Read component instance mapping configuration file.
|
protected void | processActionForward(ActionForward forward, ActionMapping mapping, ActionForm formInstance, HttpServletRequest request, HttpServletResponse response) - Overload struts1.0 counterpart in order to catch forward calls.
|
protected void | processForward(String uri, HttpServletRequest request, HttpServletResponse response) - use doForward instead
|
protected boolean | processForward(ActionMapping mapping, HttpServletRequest request, HttpServletResponse response) - Overload struts1.0 counterpart in order to catch forward calls.
|
protected boolean | processInclude(ActionMapping mapping, HttpServletRequest request, HttpServletResponse response) - Overload struts1.0 counterpart in order to catch include calls.
|
protected boolean | processValidate(ActionMapping mapping, ActionForm formInstance, HttpServletRequest request, HttpServletResponse response) - Overload struts1.0 counterpart in order to catch forward calls.
|
addServletMapping , defaultControllerConfig , defaultFormBeansConfig , defaultForwardsConfig , defaultMappingsConfig , defaultMessageResourcesConfig , destroy , destroyApplications , destroyConfigDigester , destroyDataSources , destroyInternal , destroyModules , doGet , doPost , findDataSource , findFormBean , findForward , findMapping , getApplicationConfig , getDebug , getInternal , getModuleConfig , getRequestProcessor , getResources , handleConfigException , init , initApplicationConfig , initApplicationDataSources , initApplicationMessageResources , initApplicationPlugIns , initConfigDigester , initDataSources , initInternal , initModuleConfig , initModuleDataSources , initModuleMessageResources , initModulePlugIns , initOther , initServlet , log , parseModuleConfigFile , process |
doForward
protected void doForward(String uri,
HttpServletRequest request,
HttpServletResponse response)
throws IOException,
ServletException
Do a forward, and eventually catch uri containing Tiles definition.
If uri is a valid uri, do a forward to it.
If uri is a valid definition name, Tiles context is created from definition,
and definition path is used as uri.
uri
- Uri or Definition name to forwardrequest
- Current page requestresponse
- Current page response
init
public void init()
throws ServletException
Init method.
This method is call on any servlet.
- init in interface ActionServlet
initComponentDefinitionsMapping
public void initComponentDefinitionsMapping()
throws ServletException
Read component instance mapping configuration file.
This is where we read files properties.
processActionForward
protected void processActionForward(ActionForward forward,
ActionMapping mapping,
ActionForm formInstance,
HttpServletRequest request,
HttpServletResponse response)
throws IOException,
ServletException
Overload struts1.0 counterpart in order to catch forward calls.
This is an exact copy, except the call to RequestDispatcher.forward()
replaced by doForward().
This method is only used with Struts1.0.x
Forward to the specified destination, by the specified mechanism,
if an ActionForward
instance was returned by the
Action
.
forward
- The ActionForward returned by our actionmapping
- The ActionMapping we are processingformInstance
- The ActionForm we are processingrequest
- The servlet request we are processingresponse
- The servlet response we are creating
processForward
protected void processForward(String uri,
HttpServletRequest request,
HttpServletResponse response)
throws IOException,
ServletException
use doForward instead
Do forward, and eventually catch uri containing Tiles definition.
Method left for compatibility reasons.
uri
- Uri or Definition name to forwardrequest
- Current page requestresponse
- Current page response
processForward
protected boolean processForward(ActionMapping mapping,
HttpServletRequest request,
HttpServletResponse response)
throws IOException,
ServletException
Overload struts1.0 counterpart in order to catch forward calls.
This is an exact copy, except the call to RequestDispatcher.forward()
replaced by doForward().
This method is only used with Struts1.0.x
Process a forward requested by this mapping, if any. Return
true
if processing of this request should continue (i.e.
be processed by an Action class), or false
if we have
already handled this request.
mapping
- The ActionMapping we are processingrequest
- The request we are processingresponse
- The response we are processing
processInclude
protected boolean processInclude(ActionMapping mapping,
HttpServletRequest request,
HttpServletResponse response)
throws IOException,
ServletException
Overload struts1.0 counterpart in order to catch include calls.
This is an exact copy, except the call to RequestDispatcher.include()
replaced by doInclude().
This method is only used with Struts1.0.x
Process an include requested by this mapping, if any. Return
true
if processing of this request should continue (i.e.
be processed by an Action class), or false
if we have
already handled this request.
mapping
- The ActionMapping we are processingrequest
- The request we are processingresponse
- The response we are processing
processValidate
protected boolean processValidate(ActionMapping mapping,
ActionForm formInstance,
HttpServletRequest request,
HttpServletResponse response)
throws IOException,
ServletException
Overload struts1.0 counterpart in order to catch forward calls.
This is an exact copy, except the call to RequestDispatcher.forward()
replaced by doForward().
This method is only used with Struts1.0.x
Call the validate()
method of the specified ActionForm,
and forward back to the input form if there are any errors. Return
true
if we should continue processing (and call the
Action
class perform()
method), or return
false
if we have already forwarded control back to the
input form.
mapping
- The ActionMapping we are processingformInstance
- The ActionForm we are processingrequest
- The servlet request we are processingresponse
- The servlet response we are processing
Copyright B) 2000-2005 - Apache Software Foundation