Component responsibilities are defined below:
Model: Model is responsible for retrieving data from the database and saving the data into the database. All the business logics are implemented in the Model components. Data entered by the user through View are check in the model before saving into the database.
Model is responsible for following:
Data access: Retrieving data from Database.
Data validation: Validation of data entered at View layer.
Data saving logic: Logic to save data from view layer to database.
View: View represents the user view of the application and is responsible for taking the input from the user, dispatching the request to the controller and then receiving response from the controller and displaying the result to the user. HTML, JSPs, Custom Tag Libraries and Resources files are the part of view component.
Controller: Controller is intermediary between Model and View. Controller is responsible for receiving the request from client. Once request is received from client it executes the appropriate business logic from the Model and then produce the output to the user using the View component. ActionServlet, Action, ActionForm and struts-config.xml are the part of Controller.