Features of Struts 2
Features of Struts 2 Framework
Struts 2 framework is used to develop MVC (Model View Controller) based web applications. Struts 2 is the combination of webwork framework of opensymphony and struts 1.
Struts2
struts2 = webwork + struts1
Struts 2 provides many features that were not in struts 1. Some important features of struts 2 framework are as given below;
- Simple and Easy
- Simplified Design
- Tag support
- Easy to modify tags
- Easy Plugins
- Stateful Checkboxes
- Configurable MVC components
- POJO based actions
- AJAX support
- Integration support
- Various Result Types
- Various Tag support
- Theme and Template support
Simplified Design
Programming the abstract classes instead of interfaces is one of design problem of struts1 framework that has been resolved in the struts 2 framework. Most of the Struts 2 classes are based on interfaces and most of its core interfaces are HTTP independent. Struts 2 Action classes are framework independent and are simplified to look as simple POJOs. Framework components are tried to keep loosely coupled.
Tag support
Struts2 has improved the form tags and the new tags allow the developers to write less code.
Easy to modify tags - Tag markups in Struts2 can be tweaked using Freemarker templates. This does not require JSP or java knowledge. Basic HTML, XML and CSS knowledge is enough to modify the tags.
Easy Plugins - Struts 2 extensions can be added by dropping in a JAR. No manual configuration is required!
AJAX Support - The AJAX theme gives interactive applications a significant boost. The framework provides a set of tags to help you ajaxify your applications, even on Dojo.
Stateful Checkboxes - Struts 2 checkboxes do not require special handling for false values.
QuickStart - Many changes can be made on the fly without restarting a web container.
Customizing Controller - Struts 1 lets to customize the request processor per module, Struts 2 lets to customize the request handling per action, if desired.
Easy Spring Integration - Struts 2 Actions are Spring-aware. Just need to add Spring beans.