Struts 2 Tutorials, Tips & Tricks

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.

Struts 2 Action Chaining example

In Struts 2, sometimes you may want to process another action when one action completes. For example on successfully submitting a form you want to render output from other action.This is called Action chaining in Struts 2. One action leads to another one and so on.Request > Action 1 > Action 2 > ResponseIn Struts ...

Struts2 + FreeMarker Tempalte (FTL) Integration example

Struts2 + FreeMarker Tempalte (FTL) Integration example
Welcome to Freemarker Tutorial Series. In previous post we created Spring MVC based Hello World Freemarker Template example. We learned few APIs of freemarker and also how to integrate it with Spring MVC based application. Following are the list of tutorials from Freemarker tutorial series.Today we will create a Struts2 based application that uses Freemarker FTL as view instead of JSP. This would give ...

Struts 2 Tip: Override Default Theme

Recently I came up with a requirement in Struts 2 to display a particular form with some style and alignment. While creating the form the developer had used Struts 2's taglib /struts-tags to paint the user controls like textboxes and select boxes.For example:<s:form action="add" method="post"> <s:textfield name="contact.firstName" label="Firstname"/> <s:textfield name="contact.lastName" label="Lastname"/> </s:form>Now it turns of that Struts 2 parse these s: tags and generate HTML tags like <INPUT> ...

Writing a URL Shortner in Java Struts2 & Hibernate

Writing a URL Shortner in Java Struts2 & Hibernate
This is an attempt to create a simple URL shortner service in pure JEE with Struts2 and Hibernate.Creating Base Framework I always have Basic framework ready which gives a kick start to the web app development. You don't have to hassle about different configuration issues/jar file issues etc. Let us start with creating sample base framework ...

Tutorial: Create Struts2 Hibernate Example in Eclipse

Tutorial: Create Struts2 Hibernate Example in Eclipse
This is a demo Contact Manager application that we will create using Struts2 and Hibernate framework. In this article we will see how we can use Hibernate to perform Insert / Delete operations in Struts2 framework.Our Goal Our goal will be to demonstrate the use of Struts2 with Hibernate framework and to create a demo application "Contact Manager". The basic requirement of the Contact Manager app ...

Struts 2 Ajax Tutorial with Example

Struts 2 Ajax Tutorial with Example
Welcome to the last part of 7 article series of Struts 2 Framework tutorials. In previous article we saw how to implement File Upload functionality in Struts 2. In this article we will see how we can implement Ajax support in a webapplication using Struts2 framework.AJAX support in Struts 2 Struts 2 provides built-in support to AJAX using Dojo Toolkit library. If you are new ...

Struts 2 File Upload and Save Tutorial with Example

Struts 2 File Upload and Save Tutorial with Example
Welcome to Part-6 of 7-part series of Struts2 Framework. In previous part we went through basics of Struts2 Interceptors. Also we created a custom interceptor and integrated it through Struts2 application.It is strongly recommended to go through previous articles in case you new to Struts2 Framework.Today we will see how to do File Upload in Struts2. We will use Struts2 built-in FileUploadInterceptor in our ...

Struts2 Interceptors Tutorial with Example

Struts2 Interceptors Tutorial with Example
Welcome to Part-5 of 7-Part series where we are discussing different aspects of Struts2 Framework. In the previous article we saw how to integrate Tiles framework with Struts2.Today we will explorer the world of Interceptors in Struts2. We will see what Interceptors are and how to configure them in a Struts2 based web application.Struts 2 Interceptors: Basics Struts2 provides very powerful mechanism of controlling ...

Struts 2 Tiles Plugin Tutorial with Example in Eclipse

Struts 2 Tiles Plugin Tutorial with Example in Eclipse
Welcome to Part-4 of the 7-part series where we will go through different aspects for Struts2 Framework with some useful examples. In previous part we went through Struts2 Validation Framework. We saw how easy it is to integrate validation in your struts2 application.In this part we will discuss about Tiles Framework and its Integration with Struts2. We will add Tiles support to our ...

Struts2 Validation Framework Tutorial with Example

Struts2 Validation Framework Tutorial with Example
Welcome to Part-3 of 7-part series of tutorials where we will go through different practical aspects of Struts2 Framework. In the last part we Created a Basic Struts2 Application from Scratch. I strongly recommend you to go through the previous articles in case you are new to Struts2.In this article we will learn how to ...
Page 1 of 212