What Is the Request Processor in Struts?
Java frameworks help the programmer build applications quickly by providing a way to tie together screen designs and business logic. Struts was one of the first of these frameworks and still is widely used.
-
Definition
-
The RequestProcessor is a central part of Struts. It accepts an action that has been passed to the framework by a "view" (a web page composed with Struts tags). Using configuration files, it associates validation with the data that has been passed to it and an "action." It runs the validation, and initiates and calls the class that performs the action. It then passes on the results of the action to its intended target.
Overriding
-
Override the RequestProcessor to customize the work flow if necessary. The more complexity in the work flow, the likelier the need for modification.
-
ComposableRequestProcessor
-
ComposableRequestProcessor is the replacement for RequestProcessor and was designed to allow simpler customization. Overriding the RequestProcessor could be cumbersome. ComposableRequestProcessor allows the addition of commands through configuration.
-