Struts 2 features
1. What is the difference between Struts 1 and Struts 2 features?
The major differences between supports two are as follows :
- POJO is available in Struts2 but not in Struts 1
- Struts 2 classes directly map to a POJO, thereby offering more flexibility unlike Struts 1 in which the classes are mapped with a JSP
- In Struts 1, for the presentation layer, only JSPs can be used but Struts 2 offers us more technologies such as velocity, freemaker, Jasper reports, etc.
2. How does Struts 2 supports AJAX?
Struts 2 provides supports for AJAX using a JavaScript library – Dojo Toolkit. It has various tags for developing an application in less code.
3. How does Struts 2 handle form submission and data binding?
Struts 2 handles this by automatically mapping the parameters with the action properties. The framework utilise the Object Graph Notation Language (OGNL) when the form is submitted by the user.
Struts 2 Features
Struts is a popular open-source framework of Java for developing large scale web-applications. It provides a framework for implementing MVC-architectured applications promoting the separation of concerns between business and presentation logic. Struts is an essential framework for building J2EE (Enterprise Edition) based web apps.
Struts 2 comes with a complete cycle development framework, from design to deployment and maintenance of the application, Struts 2 has full support for everything. It was originally known as “web work 2”.
In this article, we’ll look at the features of Struts 2.