Struts Tutorials


Apache Struts 2 is an open-source web application framework for developing Java EE web applications. It uses and extends the Java Servlet API to encourage developers to adopt a model‐view‐controller (MVC) architecture. The WebWork framework spun off from Apache Struts aiming to offer enhancements and refinements while retaining the same general architecture of the original Struts framework.

Platform: Cross-platform (JVM)

Designed By: Craig McClanahan

Developer: Apache Software Foundation

Website: www.struts.apache.org


Struts 2 Merge Tag Example

Struts 2 merge tag is used to merge more than one lists or maps into a single list or map. You may also describe as, it will merge View details »

Struts 2 Append Tag Example

On this page, you will learn how to concatenate the multiple lists into a single list. To do this type operation Struts 2 provide the View details »

Struts 2 Validation Example using Validate Method and XML File

In this Struts 2 tutorial, you will learn how to validate the input of the form using struts validation. You can validate input of form in two ways View details »

Struts 2 Multiple Namespace Example

Struts 2 namespace provides a functionality to resolve the conflict between same actions names located at different modules. We can define the multiple View details »

Struts 2 Multiple Configuration File Example

If you are planning to develop a large scale Struts based application, you must aware with the include file functionality of View details »

Dynamic Pie Chart Example using Struts 2 and Highchart

In this Struts 2 tutorial, we are going to create the Pie Chart using Highcharts. Highcharts is a pure JavaScript based charting library meant to enhance web applications by View details »

Struts 2 and Oracle Database Connectivity Example

In this example, we will create a Struts 2 application that will connect to the Oracle database. To connect Struts 2 application with database first of all View details »

Struts 2 + iText + MySQL Dynamic PDF Report Example

In the previous Struts2 and iText example, I have simply put the static values to create the PDF report. But in this example we fetch the multiple records View details »

Struts 2 and iText PDF Report Integration Example

In this tutorial, we have integrated the Struts 2 and iText to generated the PDF report. iText is an open source and widely used with Java to View details »

Struts 2 Set Tag Example

In this tutorial we are going to tell how to use Struts 2 set tag (<s:set />). The set tag assigns a value to a variable View details »

Struts 2 If, ElseIf and Else Tag Example

On this page we are going to show how to check condition on JSP page using Struts 2 If, ElseIf and Else tag. View details »

Struts 2 and Hibernate Integration Example- XML based

In this Struts 2 tutorial, we will show you how to integrate the Struts 2 application with Hibernate and save the data into the database. View details »

Struts 2 CRUD Example using jQuery Ajax and JDBC

On this page, we will create a simple Struts2 CRUD operation using jQuery ajax. The ajax() method is used to perform an AJAX (asynchronous HTTP) request. View details »

Struts 2 CRUD Example using jQuery JSON and JDBC

This Struts 2 tutorial will show you how to create CRUD operation using jQuery. jQuery provide getJSON() method for handing the actions. View details »

Struts 2 Create, Read, Update and Delete (CRUD) Example using JDBC

In this Struts 2 tutorial we will create a simple application for Create, Read, Update and Delete (CRUD) operation using JDBC.CRUD is the basic module that View details »

Sending email using Struts 2 and JavaMail API

In this tutorial you will learn how to send an email in your Struts 2 application using JavaMail API via Gmail SMTP. JavaMail API provides a platform-independent and View details »

Struts 2 and JSON Integration using Annotation Example

In this Struts 2 tutorial, we will learn to get JSON response using Annotation. In the previous tutorial you have seen we get the JSON response using struts.xml but if you are using View details »

Struts 2 and JSON Integration Example

In this Struts 2 tutorial, we get the JSON response through our Struts 2 application. JSON is most popular way to data-interchange View details »

Pagination in Struts 2 using jQuery datatable

In this Struts 2 tutorial, we will organize the bunch of data into pagination. In this example we are using jQuery dataTable to create pagination for huge amount of data. View details »

Struts 2 File Upload Example

In this Struts 2 tutorial we will help you to upload file in Struts 2 application. In Struts 2, <s:file> tag is used to create file upload component. View details »

Struts 2 Annotation Login Example

In this Struts 2 tutorial we will create a login application using Annotation.To create a annotation based application you need to include the View details »

Struts2 and jQuery JSON integration Example

In this Struts 2 tutorials we are going to integrate the jQuery JSON to fetch the data without page refresh. To do this jQuery provide predefined method $.getJSON(). View details »

Login and Logout using Session in Struts 2

This Struts 2 tutorial will explain how to manage the Session in Struts 2 and develop a login and logout module on the basis of Session. View details »

Base64Encoder- How to display byte array image in JSP using Struts2

Retrieving images from database and display it on JSP page is little bit tricky but we have many option to do that. In my previous Struts example View details »

How to display Image in JSP from database using Struts 2

In this Struts 2 tutorials we are going to retrieve the images from database and display on JSP pages. As we know that to store the images in database we use the BLOB datatype. View details »

How to upload Image in database using Struts 2

In this tutorial we are going to explain how to Upload/Insert images in database using Struts 2. View details »

How to send data from JSP to Struts action class using jQuery Ajax

This tutorial will explain the detail of How to send the Form value from JSP to Action class using Ajax. In this tutorial we are going to use jQuery Ajax to send the requests and getting the responses on the same page. View details »

How to call Action class using Ajax in Struts 2

This tutorial will explain how to implements Ajax to call action class in Struts 2. In this example we are going to use jQuery Ajax to fetch the list of data. jQuery $.ajax() method set some rule to get and send responses and requests. View details »

Struts 2 Login Example using MySQL database Stored Procedure

This Struts 2 tutorial will explain how to create a login application using Stored Procedure. Before creating this application some basic requirements are necessary to known. View details »

How to Fetch data from Database in JSP using Struts 2

This Struts 2 tutorials will explain how to fetch data from MySQL database using struts 2. In this demo we are going to use Java Collection List to store all the data and display the collection of data using Struts 2 iterator tag. View details »

Struts 2 and Jasper Report Integration Example

This struts 2 tutorials explain how to integrate Jasper iReport in your dynamic web application to generate the PDF report. Before starting the coding, we need to include Jasper iReport JAR dependency in Struts 2 project. View details »

Struts 2 and MySQL Database Connectivity Example

This Struts 2 tutorial explains how to connect with database using Struts 2 Framework and save the details in database table. View details »