Home » Enterprise Java » Struts 2

Struts 2

Struts Validation Example

To ensure users are entering valid information, validation of form’s input is necessary for every web application. The struts2 framework provides built-in robust validation framework which is highly decoupled from the view and controller, thus it can be easily integrated with the existing applications. In this tutorial, we will see how Struts2 validation works by creating a sample application that ...

Read More »

Struts2 Action Mapping Example

Apache Struts2 is an elegant, extensible framework for creating the enterprise-ready Java web applications. The framework is designed to streamline the development cycle i.e. from building to deploying and to maintaining the applications over time. In this tutorial, we will show developers how to create a simple action mapping example in Struts2. 1. Introduction 1.1 Struts Framework Struts is a ...

Read More »

Struts JSP Example

Apache Struts2 is an elegant, extensible framework for creating the enterprise-ready Java web applications. The framework is designed to streamline the development cycle i.e. from building to deploying and to maintaining the applications over time. In this example, we will show developers how to create a simple Hello World example in Struts2. 1. Introduction 1.1 Struts Framework Struts framework is ...

Read More »

Struts Tiles Plugin in Eclipse Example

Struts Tiles framework is a layout framework, which allows users to maintain a standard look of the header, footer, and menu across all of the web pages efficiently. It is used for both page decorating and componentization. In this part, we will discuss the Tiles Framework and its integration with Struts2. Table Of Contents 1. Introduction 1.1 Struts Tiles Framework ...

Read More »

Struts 2 and Log4J Example

In this example we will learn how to integrate Struts2 application with Log4j logging framework. Apache Struts is a free, open-source, MVC framework for creating elegant, modern Java web applications. It favors convention over configuration, is extensible using a plugin architecture, and ships with plugins to support REST, AJAX and JSON. Log4J is Apache’s popular logging framework. Tools and technologies ...

Read More »

Struts 2 @ResultPath Annotation Example

Struts 2, the famous Model-View-Controller (MVC) framework, has several features that allows you to shape your webapp the way you want it. Among those features, a handy one is @ResultPath, which allows you to change the location where results are stored. The best way to explain how it works is through an example.         1. Setup a ...

Read More »

Struts 2 “HelloWorld” Example

Struts 2 is a famous Model-View-Controller (MVC) framework, mainly found in the enterprise market since its release in 2000. Its goal is to separate the model (the business logic) from the view (the HTML pages) and the controller (the instance that manages the interaction between the model and the view). Struts provides the controller class, while we are in charge ...

Read More »