Struts is used to create a web applications based on servlet and JSP. Struts depend on the MVC (Model View Controller) framework. Struts application is a genuine web application. Struts are thoroughly useful in building J2EE (Java 2 Platform, Enterprise Edition) applications because struts takes advantage of J2EE design patterns. Struts follows these J2EE design patterns including MVC.
In struts, the composite view manages the layout of its sub-views and can implement a template, making persistent look and feel easier to achieve and customize across the entire application. A composite view is made up by using other reusable sub views such that a small change happens in a sub-view is automatically updated in every composite view.
Struts consists of a set of own custom tag libraries. Struts are based on MVC framework which is pattern oriented and includes JSP custom tag libraries. Struts also supports utility classes.
Features of Struts: Struts has the following features:
- Struts encourages good design practices and modeling because the framework is designed with “time-proven” design patterns.
- Struts is almost simple, so easy to learn and use.
- It supports many convenient features such as input validation and internationalization.
- It takes much of the complexity out as instead of building your own MVC framework, you can use struts.
- Struts is very well integrated with J2EE.
- Struts has large user community.
- It is flexible and extensible, it is easy for the existing web applications to adapt the struts framework.
- Struts provide good tag libraries.
- It allows capturing input form data into javabean objects called Action forms.
- It also hand over standard error handling both programmatically and declaratively.
Working of Struts:
In the initialization phase, the controller rectify a configuration file and used it to deploy other control layer objects. Struts configuration is form by these objects combined together. The struts configuration defines among other things the action mappings for an application.
Struts controller servlet considers the action mappings and routes the HTTP requests to other components in the framework. Request is first delivered to an action and then to JSP. The mapping helps the controller to change HTTP requests into application actions. The action objects can handle the request from and responds to the client (generally a web browser). Action objects have access to the applications controller servlet and also access to the servlet’s methods. When delivering the control, an action objects can indirectly forward one or more share objects, including javabeans by establish them in the typical situation shared by java servlets.
- Introduction to Hibernate Framework
- Introduction to Spring Framework
- Introduction to Kivy ; A Cross-platform Python Framework
- React.js (Introduction and Working)
- How to choose between CMS or Framework according to the need?
- Software Framework vs Library
- 10 Node.js Framework to be used in 2019
- Ionic Framework : The Power Behind Modern Web Apps
- Lock framework vs Thread synchronization in Java
- Aspect Oriented Programming and AOP in Spring Framework
- Angular vs ReactJS : Which one is Most In-Demand Frontend Development Framework in 2019?
- Working with UDP DatagramSockets in Java
- Working with csv files in Python
- Working with PDF files in Python
- Working with zip files in Python
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.