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.
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Introduction to Hibernate Framework
- Introduction to Spring Framework
- Introduction to the Spring Data Framework
- Introduction to Kivy ; A Cross-platform Python Framework
- React.js (Introduction and Working)
- Spring vs. Struts in Java
- How to choose between CMS or Framework according to the need?
- 10 Node.js Framework to be used in 2019
- Software Framework vs Library
- Difference Between Laravel and CodeIgniter Framework in PHP
- Installation and Configuration Symfony Framework
- CakePHP Framework | Installation and Configuration
- Slim Framework | Installation and Configuration
- Ionic Framework : The Power Behind Modern Web Apps
- Aspect Oriented Programming and AOP in Spring Framework
- Lock framework vs Thread synchronization in Java
- Which One is Most Demanding Back-End Web Framework between Laravel , NodeJS and Django ?
- Angular vs ReactJS : Which one is Most In-Demand Frontend Development Framework in 2019?
- Working Process of Node.js
- 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.