Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training

Struts Tutorial

This tutorial will contain the various aspects of Struts such as what is struts, features of struts, architecture of struts, download and install struts, struts actions, struts logic tags, struts integration with other framework, struts validator framework.


Login form in Struts2 version 2.3.16 Struts 2 Login Application Struts 2 Hello World Annotation Example Struts 2 Tutorial: Easy steps to learn Struts 2 Struts2 Application in Eclipse: Running the application in Eclipse IDE Struts 2 Hello World Application using Eclipse Interceptors in Struts 2 Struts 2 Action Tag Struts 2 in Agile Development Environment Struts 2 UI Tags Generic Tags Creating own Interceptor What are Interceptors in Struts 2 and how do they work? Results Value Stack / OGNL Action in Struts 2 Framework Struts 2 Interceptors Struts Maven - How to use Maven dependency of Struts Download Struts How Struts 2 Framework works? Architecture of Struts 2 Framework Features and Enhancements in Struts Struts 2 Tutorials - Struts version Struts Flow Diagram Step By Step Struts Tutorial Struts 2 Login Form Example Struts 2 Hello World Example Introduction to Struts 2 Framework Downloading and Installing Struts 2.3.8 Struts 2.3.8 released with new features Struts 2.3.8 Tutorials and Examples Subset Tag Actionerror Tag Struts 2 Autocompleter,Struts 2 Autocomplete Generator Tag Struts 2 Application Struts 2 zero configuration,Struts 2 zero configuration Example Static Parameter, Static Parameter in Struts 2, Struts 2 Static Parameter Pagination Example Struts 2.2.1 Title Struts2 ElseIf Tag Example Struts2 Else Tag Example Struts2 If,Else,ElseIf Tag Example Struts2 tag refrences and Example How to download, compile and test the tutorials using ant. Struts 2.1.8 Login Form Struts 2.1.8 Hello World Example Download Struts 2.1.8, Downloading and installing Struts 2.1.8 Showcase application

In this section we will discuss about Struts.

This tutorial will contain the various aspects of Struts such as What is Struts, features of struts, Architecture of Struts, download and install struts, struts actions, Struts Logic Tags, struts integration with other framework, Struts Validator Framework.

What is Struts ?

Struts is an open source MVC based framework for developing web applications. Craig McClanahan was the creator of Struts and later it donated to Apache Foundation. Struts allows for the web form components, validation, internationalization, error handling, tiles layout etc. Struts framework is also called web framework. Struts is created on MVC based so it separates the model from view and the controller. Struts framework provides the following three key components :

  • Request handler (provided by the application developer).
  • Response handler (handles the response to complete it even if control is transferred to another resource for completing the response).
  • Tag library (facilitate developers to create more effective form-based applications).

Features of Struts

Struts has various of features some of them are as follows :

  • Struts provides the POJO based actions.
  • Thread safe.
  • Struts has support of AJAX
  • Struts has the template support.

Architecture of Struts

Struts is based on the MVC architecture that defines the business logic, application data and the presentation data separately. Struts framework is composed with the various of classes and interfaces, organized into different packages. It has also support of the utility and helper classes. Following is the view of the Struts architecture :

  • Struts Model Component : Provides Model of the business logic.
  • Struts View Component : Takes the input from the user and provide the information to them.
  • Struts Controller Component : In Controller, Action class handles the request and communicate with the model layer.

Versions Of Struts

Struts is also released in various versions. Struts major versions are popularly known as Struts 1, and Struts 2 (till the time of writing this tutorial). Their sub versions are as :

  • struts 2.3.14 (latest version till the writing of this tutorial)
  • struts 2.3.1
  • struts 2.2.1
  • struts 2.0.6
  • struts 1.1

Download And Install Struts

Struts is available as open source and it is released by the Apache Software foundation, so you can download Struts from the Apache Software Foundation's website. You can follow this link to download Struts You can select the specific version of Struts and download.

Struts Built-In Actions

Struts provide the built-in actions that facilitate the various functionalities useful to diverse applications. Some of the Built-in classes are as :

  • org.apache.struts.actions.DispatchAction
  • org.apache.struts.actions.ForwardAction
  • org.apache.struts.actions.LocaleAction
  • org.apache.struts.actions.MappingDispatchAction

Struts Logic Tags

Struts logic tags helps developer in to generate the html output based on different control statements. Some of the Struts Logic Tags are as :

  • empty
  • equal
  • forward
  • greaterEqual
  • iterate

Struts Integration With Other Framework

Struts is capable to integrate with the other frameworks like, Hibernate, Spring, JSF.

Struts And Validation

Validation is the main feature of any web-application. It is useful in several cases such as validating for number input, character input, empty field, null input. In Struts these validation is possible due to validation framework. Validation framework needed two XML files named validator-rules.xml and validation.xml


Share on Google+Share on Google+

Struts Tutorial

Posted on: April 24, 2013 If you enjoyed this post then why not add us on Google+? Add us to your Circles



Discuss: Struts Tutorial  

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image