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

Struts Guide

This tutorial is extensive guide to the Struts Framework.


Struts 2 Tutorial and Examples Struts General Availability - released Login form in Struts2 version 2.3.16 Struts 2 Login Application Struts 2 version released Struts 2 version released Struts 2 Hello World Annotation Example Struts Roseindia Struts 2 Tutorial: Easy steps to learn Struts 2 Difference between Struts and Spring Apache Struts launched to fix vulnerable Feature 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 1 Tutorial and example programs Struts Tutorial What is Struts Struts Flow Diagram Step By Step Struts Tutorial Struts 2 Login Form Example Struts Video Tutorials Struts 2 Hello World Example Introduction to Struts 2 Framework Downloading and Installing Struts 2.3.8 In Struts What is Model? What is Struts? Download Struts What is Struts Framework? Struts Framework Latest Version of Struts Framework Downloading Struts Official example Struts 2.3.8 released with new features Struts 2.3.8 Tutorials and Examples Hibernate4 Struts Integration

Struts Guide


- This tutorial is extensive guide to the Struts Framework. In this tutorial you will learn how to develop robust application using Jakarta Struts Framework. This tutorial assumes that the reader is familiar with the web application development with JSP, Servlets, JDBC and custom tags. To begin with let's understand the Jakarta Struts Framework. -

What is Struts? -

- Struts Frame work is the implementation of Model-View-Controller (MVC) design pattern for the JSP. Struts is maintained as a part of Apache Jakarta project and is open source. Struts Framework is suited for the application of any size. Latest version of struts can be downloaded from We are using jakarta-struts-1.1 and jakarta-tomcat-5.0.4 for this tutorial. -

What is Model-View-Controller (MVC) Architecture?

- Model-View-Controller architecture is all about dividing application components into three different categories Model, View and the Controller. Components of the MVC architecture has unique responsibility and each component is independent of the other component. Changes in one component will have no or less impact on other component. Responsibilities of the components are: -

- Model: Model is responsible for providing the data from the database and saving the data into the data store. All the business logic are implemented in the Model. Data entered by the user through View are check in the model before saving into the database. Data access, Data validation and the data saving logic are part of Model. -

- View: View represents the user view of the application and is responsible for taking the input from the user, dispatching the request to the controller and then receiving response from the controller and displaying the result to the user. HTML, JSPs, Custom Tag Libraries and Resources files are the part of view component. -

- Controller: Controller is intermediary between Model and View. Controller is responsible for receiving the request from client. Once request is received from client it executes the appropriate business logic from the Model and then produce the output to the user using the View component. ActionServlet, Action, ActionForm and struts-config.xml are the part of Controller. -

- -

Setting Up Development Environment

- Installing JDK: -

- Download JDK 1.4 or above from sun site. Follow the instruction given in the installation manual and install JDK. -

- Installing Tomcat: -

- Download Tomcat from the apache site and install it. I have downloaded jakarta-tomcat-5.0.4 and installed for this tutorial. To  test your installation go to your installation directory/bin and issue startup command to run the server. Open browser and type http://localhost:8080/ to test the server. It should display the welcome page. If not consult tomcat documentation before going further. -

- Installing Struts Application: -

- Download latest version of Struts from the official site of Struts Extract the file ito your favorite directory and copy struts-blank.war, struts-documentation.war and struts-example.war from "jakarta-struts-1.1\webapps" directtory into "jakarta-tomcat-5.0.4\webapps" directory. - -

struts-blank.war is the blank struts application which is useful in creating struts application from scratch. We will use this file to create our web application. -

struts-documentation.war contains API and important documents for the struts application development. -

struts-example.war is simple MailReader Demonstration Application. -

Developing First Struts Application

Rename struts-blank.war  to struts-tutorial.war from jakarta-tomcat-5.0.4\webapps and copy it to the "jakarta-tomcat-5.0.4\webapps" directory. Tomcat automatically extracts the file and loads the application.  -

Note: I have decided to use JBoss 3.2.3 for next parts as it is very easy to deploy the application in JBoss and I have developed the Ant script for easy deployment of the tutorial. The hot deployment feature of JBoss is very useful and it pickups the new ear files and deploys automatically.

You can download JBoss 3.2.3 from For installing and how to use JBoss please have a look at



Share on Google+Share on Google+

Struts Guide

Posted on: February 12, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles



Discuss: Struts Guide   View All Comments

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
August 22, 2011

i know java
December 20, 2011

please provide detail tutorail for struts+ APPLICATION
vishal kumar
April 2, 2012
struts question

with out use netbeans of struts example please tell me structure of tomcat.
Mayadhar Sankhua
August 22, 2013
Struts & JSP

plz provide the difference between struts & JSP