| es.udc.mypersonalizer.kernel.controller.requestprocessor.MyPersonalizerRequestProcessor
MyPersonalizerRequestProcessor | public class MyPersonalizerRequestProcessor extends RequestProcessor (Code) | | This is a sublcass of Jakarta Struts' RequestProcessor, which
function is to manage controller requests in an MVC architecture.
The functionality it adds is processing filters: before each request
is processed (by super.processActionPerform), MyPersonalizerRequestProcessor
applies a chain of filters to the request, so that functionality like
session managing, cookie checking or requiring authentication for
actions can be enabled through filters.
The chain of filters that will be applied is defined with configuration
parameters, and it is read when the class MyPersonalizerRequestProcessor
is first loaded. For each filter, a unique instance of its class is
created and then pushed into the chain.
For each filter, the following configuration parameters are needed:
- Its class
- Optionally, the filter's configuration parameters
The order in which filters are defined in configuration parameters
determines its execution order when a request arrives.
This configuration data is taken from a
MyPersonalizerRequestProcessorConfig object created with the data from
configuration files.
author: Daniel Fernandez author: Fernando Bellas since: 1.0 |
MyPersonalizerRequestProcessor | public MyPersonalizerRequestProcessor()(Code) | | Instantiates an object of this class
|
processActionPerform | protected ActionForward processActionPerform(HttpServletRequest request, HttpServletResponse response, Action action, ActionForm form, ActionMapping mapping) throws IOException, ServletException(Code) | | Executes all the filters assigned to this action and, if filters do
not fail, executes the required action by calling
RequestProcessor.processActionPerform.
If an exception occurs during the filters' execution,
this class performs a forward action towards the struts-defined
mandatory forward "InternalError" as defined in
DefaultAction
Parameters: request - the HttpServletRequest containing the request parameters Parameters: response - the HttpServletResponse associated Parameters: action - the Struts' Action required to be executed Parameters: form - the Struts' ActionForm related to this action Parameters: mapping - the Struts' ActionMapping a ActionForward which constitutes the result of the execution throws: IOException - if an input/output error ocurrs throws: ServletException - if a servlet-relate error occurs |
|
|