Struts - SPLessons
SPLessons 5 Steps, 3 Clicks
5 Steps - 3 Clicks

Struts 2 Tutorial

Struts 2 Tutorial

shape Description

Struts 2 Tutorial, Apache Struts 2, another popular Java Model-View-Contraller (MVC) framework, combine of both successful WebWork and Struts 1.x web frameworks. Struts is an open source framework which was built by Craig McClanahan to develop MVC web applications, later on it was given to the Apache foundation in May 2000 then the stable version of Struts was released in June 2001 with features and later on struts2.0 released in 2014, present version of Struts2 is 2.5.2. To understand the concept of Stuts2 user need to have little knowledge on Servlet, JSP, MVC. The advantage of Struts is that integration with other frameworks such as Spring, Hibernate. Following is the difference between the versions of the Struts.
Struts 1.0 Version Struts 2.0 Version
Struts 1.0 Version is released in June-2010 Struts 2.0 Version released in March 2014.
Structs 1.0 Contain controller is Action class Structs 2.0 Contain controller is Filter Dispatcher.
Action class is singleton class.So struts 1.0 is not thread safe. Struts 2.0 is Filter Dispatcher object is thread safe object.
Struts 1.0 Version Doesn't support Annotations. Struts 2.0 Version supported Annotations.
Add the struts_config file in WEB-inf folder Add the struts_config file in classes folder.

shape Prerequisites

This tutorial will help to user regarding how to start with Struts framework before this user should have a knowledge in Java programming such as Servlet, JSP, MVC , why because Struts utilized to build the web applications where as Servlets and JSP also utilized to work on same functionality so core knowledge of Java is mandatory.


shape Key Points

  • Struts 2 Tutorial - The Struts2 has a good feature that is Ajax support.
  • Struts 2 Tutorial - The Configuration file of Struts2 must be in the format of struts.xml.
  • Struts 2 Tutorial - Struts 2 has an integrated support with other frameworks.