What is Struts?
It is a java based open source framework for developing web applications. It supports MVC pattern.
Steps to make Struts Application.
Create a model class to get the data.
Create a page (jsp) to display the data stored in model class.
Create an Action class(Controller) which will interact between model and view.
Create struts.xml file, to map Action class and view.
How Struts is working?
User sends the request from browser to the server.
The FilterDispatcher accepts the request and finds the appropriate action for that.
Interceptors configurations applied for common functionality, like – validation,security, property population, logging, and profiling.
Execute action method, it allow user to execute some business logics.
Renders the output.
Return the request through the interceptors in the reverse order, to clean the additional process.
Sends the output to browser.
- Action Servlet
- Validator Framework
- Message Resources
- Struts Configuration XML Files
- View components like JSP, Freemarker
- Struts-tag libraries