Pages Navigation Menu

Coding is much easier than you think

Struts 2 Tutorials

 

Introduction to Struts 2 Framework

Apache Struts 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. It was originally created by Craig McClanahan and donated to the Apache Foundation in May, 2000. Formerly located under the Apache Jakarta Project and known as Jakarta Struts, it became a top level Apache project in 2005.

This framework tries to automate the common tasks and provides a platform for the users to build applications quickly.

In Struts 2 the model, view and controller are implemented by the actionresult and FilterDispatcher respectively.

It has core features which are implemented with interceptors, value stack concept, OGNL expression and Struts 2 tags to work around the application data, and many annotations and conventions to make this framework more simpler to use.

Struts 2 provides supports to POJO based actions, Validation Support, AJAX Support, Integration support to various frameworks such as Hibernate, Spring, Tiles etc, support to various result types such as Freemarker, Velocity, JSP etc.

 

Struts 2 Complete Tutorial

In this tutorial you will learn the step by step process that happens when the Struts 2 Framework receives a request till it generates a response back to the user.

In this tutorial you will learn how to setup development enviroment for Struts 2 Framework.

 

Struts 2 Quick Start

In this example you will see how to create a simple Hello World Application in Struts 2

Struts 2 Action explanation and example.

 

Non – Form UI Tags

Struts 2 ActionError & ActionMessage explanation and example.

The fielderror tag is a UI tag that renders field errors if they exists.

 

Struts 2 Configurations

Split the large Struts configuration file into multiple small configuration file.

Struts 2 Namespace is a concept to handle the multiple modules by given a namespace to each module.

Tutorial to show how to use Custom extension as per user requirements.

Enable the Struts 2 development mode , to aid easy debugging

 

Struts 2 Model driven

Transfer the form data into the object automatically using the OGNL expression language.

Struts 2 File Upload Tutorial

Struts 2 <s:file> file upload example with the help of the built-in FileUploadInterceptor. You will also see how to validate a file based on the file size and the content type.

 

Struts 2 UI Tags

Struts 2 UI tags, to render the HTML form and non-form components.

Struts 2 <s:textfield> textbox example.

Struts 2 <s:password> password example.

Struts 2 <s:hidden> hidden value example.

Struts 2 <s:textarea> textarea example.

Struts 2 <s:head>, render a HTML head component.

Struts 2 <s:datetimepicker>, will render a text box and append a calender icon behind, click on the calender icon will prompt a date time picker component.

 

Pagination in Struts 2

In this tutorial you will learn how make a many pages of a large information and displaying them in a limit.

 

List of all Struts 2 Examples

List of all Example files used in this tutorial

  • Struts 2 Examples Files

 

Struts 2 Reference

 

4 Comments

  1. Appreciate it for helping out, excellent information.

  2. I simply want to say I’m new to blogging and site-building and truly enjoyed this web-site. Very likely I’m going to bookmark your blog . You surely have fabulous articles and reviews. Bless you for revealing your web page.

  3. @Karmen Hassin, @Gregory Despain – Thank you.. Keep visiting our site for more such reads!!

  4. we came across a cool web page that you might love. Take a search should you want