Monthly Archive: July 2013

Struts2 Validation With Example

Introduction to Struts2 Validation Framework Struts Action 2 relies on a validation framework provided by XWork to enable the application of input validation rules to your Actions before they are executed. Struts2 Validation Framework allows …

Struts 2 Database Access

In this chapter we will teach you how to access a database using Struts 2 in simple steps. Struts is a MVC framework and not a database framework but it provides excellent support for JPA/Hibernate …

Struts 2 File Upload Example

In this example you will learn how to do file upload with the help of the built-in FileUploadInterceptor. To do this first we need to get the file form the user. We use the Struts …

Struts 2 Result Types

As mentioned previously, the <results> tag plays the role of a view in the Struts2 MVC framework. The action is responsible for executing the business logic. The next step after executing the business logic is …

Struts 2 Interceptors

Interceptors are conceptually the same as servlet filters or the JDKs Proxy class. Interceptors allow for crosscutting functionality to be implemented separately from the action as well as the framework. You can achieve the following …

Struts 2 Actions

Actions are the core of the Struts2 framework, as they are for any MVC (Model View Controller) framework. Each URL is mapped to a specific action, which provides the processing logic necessary to service the …