April 7th, 2023

Components of Struts2

  1. Filter Dispatcher
  2. Action 
  3. Result
  4. Configuration File
  5. Interceptors
  6. Deployment Descriptor
  7. Tab Library
1. Filter Dispatcher

It is the central component of Struts application. It pre-processes all incoming request and post-processes all outgoing request. This is a filter class.
This is responsible for each request and identifies the actions to process the request. It is also responsible to identify appropriate view to display the result with the help of result component.

2. Action
It is a bean class represented by action component containing the state of application and any business logic.


3. Result

The functionality of view is managed by result component. It is responsible for presentation logic and identify JSP pages to display the result.


4. Configuration File

This configuration file describes the action, result and other resources. File name is struts.xml


5. Interceptors

It is the helper component of controller and is responsible for apply cross-cutting concerns and other commonly used logics.