Apache Struts 2 is an extensible, elegant framework for creating enterprise-ready Java web applications. Struts is a frame work for web developers assumes a working knowledge about how java web applications are built. It uses and extends the Java Servlet API.
The struts framework was created by Craig McClanahan and donated to Apache Foundation in May, 2000 and Struts 1.0 was released in June 2001. Apache struts 2 originally known as Web Work2.
Struts is designed based on MVC pattern. MVC means Model View Controller. When a request is received the controller invokes an Action class. The controller is implemented as a filter.
MVC is a software designing model in expansion of MVC is Model View Controller. MVC has Model View and controller.
Model: A model is an object that contains the business logic and interacts with the persistence storage to store, retrieve and manipulate data. Model represents only data of an application.
View: View is responsible for displaying the data of application and it is responsible for displaying the results back to the user. In Struts the view layer is implemented using JSP. The view is independent of application logic.
Controller : it is an action Servlet handles all requests from the user and send to appropriate view to Display the response.
1. Struts zip file
2. Tomcat server 7.0 and above
3. Eclipse IDE.
Struts Installation and configuration:
Download the struts zip file latest version from the link http://struts.apache.org/download.cgi and extract the file save it in folder.
Add these jar files to our struts application by using Configure Build Path option in eclipse.
Required jar files for struts framework are: