The Apache Struts 2 framework is an elegant, flexible, secure, extensible and modern framework for creating enterprise-ready Java web applications. The framework is designed to fulfill all the desired needs of enterprise and streamline the full development cycle, from building, to deploying, to maintaining, testing and debugging applications over time to time. Apache Struts 2 was originally known as WebWork 2.
The struts framework was initially created by Craig McClanahan and donated to Apache Foundation in May, 2000 and Struts 1.0 was released in June 2001. The current stable release of Struts is 188.8.131.52 GA in July 16, 2013.
Struts can be defined as a web application development framework that is based on the requests and is used in order to develop the web applications of java enterprise edition (Java EE). The struts framework is The very first Model View Controller (MVC) based framework and by the use of MVC the logic, view and user input related tasks gets separated and the work is done in a clear and consistent manner that can be verified and get maintained easily. The web framework of struts is known as the request response based web application framework.
The struts framework is based on the Java Server Pages (JSP) and java servlets technologies. The struts framework recommends the continuous usage of MVC design pattern throughout the application. The life cycle based on the request of user works in this manner; first the user sends request to server in order to get the desired webpage, the dispatch servlet filter first checks the request and decides the required and suitable action, the functionalities of interceptors after proper configurations are applied on the request depending on its type, the most appropriate action gets executed in order to give response to the received request and after the proper and efficient processing the results gets prepared by the view and finally the result is sent as a response to the user respectively. The tags available in Struts 2 are of different types and these tags include control tags, data tags, form tags and AJAX tags.
The tag in struts 2 is represented using the and in this format respectively. The control tags in Struts 2 help to control the execution of webpage. Some of the control tags include if, else, else-if, merge, append, iterator tag and many others. The data tags in Struts 2 help the data and display of data related work on a page. Some of the data tags include action, include, date, param, property, set, uri, text and many others. The form tags in Struts 2 are used to provide the user interface and these types of tags help in making the user interface appearance in a proper and clear manner.
Some of the form tags include div, text, form, text-field, password, text-area, label, file, radio, select, combo-box and many others. Similarly, there are the Ajax tags also available in struts 2 like the data, control and form tags. The calls are changes from s to sx like and in this way the other tags can be represented in this manner which shows the work done in Ajax respectively. The annotations are also available in this framework and if this procedure is selected then there is no need to manually enter the configuration details inside the configuration file that is in xml.