In Struts 1.1-1.2.x RequestProcessor contains the processing logic that the Struts controller servlet performs as it receives each servlet request from the container. You can customize the request processing behavior by subclassing this class and overriding the method(s) whose behavior you are interested in changing.
Therefore a new new request processor can be plugged in without touching the Servlet. (Users did not like to subclass ActionServlet.) RequestProcessor also made possible to use a different request processor for each module, if needed.
Experience has shown that requiring people to extend a single RequestProcessor class to customize the processing flow is cumbersome, and is particularly challenging when one wants to integrate custom processing from more than one source, because of Java's single inheritance limitations.
This lead to development of ComposableRequestProcessor, which is shipped with Struts 1.3.x.
There was some discussion about whether Struts should move towards a single interface for Request Processor, behind which multiple services could be integrated, or whether a composable request processor would be more useful.
Since then, the StrutsChain project has been developed and added to the contrib branch of Struts source repository. It implements the composable model, and has gotten considerable interest from other developers. In fact, much developer list discussion indicates that it will eventually replace the existing RequestProcessor. See the StrutsChain page for details.
In the meantime, if you are interested in extending org.apache.struts.action.RequestProcessor, some historical information is retained below:
A simple example of a custom RequestProcessor is:
Which would be defined in StrutsConfigXml thus:
See the struts-config.xml DTD for the complete list of attributes accepted by the controller element.