Struts tutorial for beginners and professionals with examples in eclipse on Basics, Architecture, Configuration, Actions, Interceptors, Results, Result Types, Validations, Localization, Type Conversion, Tag Library, Exception Handling, Annotations and more.
Struts framework:
Struts is an elegant, extensible, open source framework for developing java web application. It is used to develop Model-View-Controller (MVC) architecture based web applications.
Struts 2 was originally known as webwork 2. Later on webwork and struts combined to produce a new version of struts i.e. struts 2 framework is the combination of webwork and struts.
Struts 2 = webwork + struts 1.
Struts 2 features.
1. POJO forms:
No need of Action forms in Struts 2. Any POJO class can be used to receive the form input.
2. POJO Actions:
No need of Action class in Struts 2. Any POJO class can be used as Action class.
3. Enhanced Tag Support:
Struts 2 provide no. of various tags to ease the development process.
4. Template Support:
Struts 2 provide the template support for generating common look views.
5. Easy Integration support:
Struts 2 applications can be easily integrate with other frameworks like spring, hibernate etc.
6. AJAX support:
Struts 2 provides the ajax support with ajax tags.
7. Enhanced Results support:
More special results can be get by using JasperReports, JFreeChart etc.
Difference between struts 1 and struts 2.
               Struts 1 |               Struts 2 |
|
|
Struts 2 Basic tutorial:
- Struts 2 overview
- Struts 2 Architecture
- Struts 2 Configuration Files
- Action in struts 2
- Action in struts 2 by using POJO class with example
- Action in struts 2 by implementing Action interface with example
- Action in struts 2 by extending ActionSupport class with example
- Struts 2 Hello World example
- Multiple configuration file in Struts 2 with example
- OGNL in struts 2 with example
- Value Stack in struts 2 with example
- Interceptors in struts 2 with example
- Struts 2 execAndWait interceptor with example
- Struts 2 custom interceptor with example
- Struts 2 result type with example
- Struts 2 Redirect result type with example
- Struts 2 validation framework with example
- Struts 2 validation by built-in validators with example
- Struts 2 required validator with example
- Struts 2 requiredstring validator with example
- Struts 2 stringlength validator with example
- Struts 2 int validator with example
- Struts 2 double validator with example
- Struts 2 date validator with example
- Struts 2 email validator with example
- Struts 2 regex validator with example
- Struts 2 url validator with example
- Struts 2 i18n with example
- Struts 2 Zero Configuration by convention approach with example
- Struts 2 Zero Configuration by annotation approach with example
- DispatchAction Functionality in Struts 2 with example
- Dynamic method invocation in struts 2 with example
Struts 2 UI tags tutorial:
- Struts 2 UI tags with example
- Struts 2 s:textfield, s:password and s:submit UI tags with example
- Struts 2 s:hidden UI tag with example
- Struts 2 s:textarea UI tag with example
- Struts s:radio 2 UI tag with example
- Struts 2 s:checkbox and s:checkboxlist UI tag with example
- Struts 2 s:select UI tag with example
- Struts 2 s:combobox UI tag with example
- Struts 2 s:file UI tag with example
- Struts 2 s:doubleselect UI tag with example
- Struts 2 s:updownselect UI tag with example
- Struts 2 s:optiontransferselect UI tag with example
- Struts 2 s:datetimepicker UI tag with example
- Struts 2 sx:autocompleter UI tag with example
Struts 2 control tags tutorial:
- Struts 2 control tags with example
- Struts 2 If, else if and else control tag with example
- Struts 2 iterator control tag with example
- Struts 2 merge control tag with example
- Struts 2 s:append control tag with example
- Struts 2 s:generator control tag with example
- Struts 2 s:sort control tag with example
Struts 2 data tags tutorial:
- Struts 2 data tags with example
- Struts 2 action tag with example
- Struts 2 include data tag with example
- Struts 2 bean data tag with example
- Struts 2 date data tag with example
- Struts 2 param data tag with example
- Struts 2 property data tag with example
- Struts 2 push data tag with example
- Struts 2 set data tag with example
- Struts 2 i18n and text data tags with example
- Struts 2 s:url and s:a data tags with example
Struts 2 integration tutorial:
Struts 2 interview questions: