ActionServlet provides the "controller" in the Model-View-Controller (MVC) design pattern for web applications that is commonly known as "Model 2".

ActionServlet performs the following tasks:

Struts 1.0

In Struts 1.0, request processing logic was entirely concentrated in ActionServlet. To keep it organized, the code was subdivided in a series of methods. Unsurprisingly, each method in the series had a coherent task and was named after its task.

Struts 1.1.x - 1.2.x

In Struts 1.1, the request processing code was pulled out from ActionServlet code and turned into a first class object called the RequestProcessor. The original methods remained mainly the same, but they were turned to methods in a coherent object, rather than a set of related methods in a larger object.

Struts 1.3.x

For Struts 1.3, the request processor methods has been turned into Commands, and the RequestProcessor class has been turned into ComposableRequestProcessor that invokes Command in the proper order. Rather than subclassing a monolithic object, it is possible now just to replace Commands. It is also possible to insert or remove Commands, if needed, to extend or streamline the request processing gauntlet.

ActionServlet (last edited 2009-09-20 23:12:03 by localhost)