Struts 2.0 Work flow and lifecycle:

Flow and Life Cycle:

1) When a client request for a page, a web container will receive request.

2) Container loads web.xml and transfer the request to FilterDispatcher.

3) FilterDispatcher passes the request to ActionProxy class which is responsible to apply before and after services to original business logic.

4) ActionProxy contacts ConfiguraionManager class which loads structs.xml and provides the required information back to ActionProxy.

5) ActionPorxy delegates the request along with its information to ActionInvocation.

6) ActionInvocation executes the interceptors added to an Action from 1 to N, after that it will call the business logic implemented in a specific action and executes interceptors from N – 1 in reverse order.

7) ActionInvocation receives finally result produced by an action aclass.

8) ActionProxy transfers the result back to FilterDispatcher.

9) FilterDispatcher selects an appropriate view, based on the result.

10) Finally FilterDispatcher uses RequestDispatchers forwarding mechanism and forward a view as a response back to the client.