Struts 2, Spring 4, Hibernate 4 and Maven Integration

In this tutorial I will show you how to integrate Struts 2, Spring 4, Hibernate 4 and Maven. In the previous example Integrate Spring 3, Struts 2 and Hibernate 3 , I have shown how to integrate Struts 2, Spring 3 and Hibernate 3 but I have not used maven there. For this tutorial we will create maven based web project in Eclipse. If you already have an idea on how to create a maven project in Eclipse will be great otherwise I will tell you here how to create…

Continue

Google Chart using Struts 2

We know that Google chart basically displays different statistical data on different chart types such as column chart, bar chart, line chart, pie chart etc. You can have a look at the URL https://developers.google.com/chart/ for more information before reading this tutorial on Google chart using Struts 2. You can integrate Google chart with any server side technology but here I will show you how to integrate Google chart using Struts 2. This tutorial shows step by step so that we can understand how it happens. It displays the data for…

Continue

Sending Email with attachment using Struts2

This tutorial shows how to send email with an attachment. This tutorial uses one input form where a user gives input for ‘Recipient’s Email’ where the intended email will be sent, ‘Email Subject’, ‘Email Message’ and uploads one file which will be sent as an attachment with the email. This email sending example uses gmail smtp server to send the mail. If you need only file upload example then you can search in the search box you will get file upload examples in Struts, JSF, Codeigniter.

Continue

Upload multiple files using single browse button in Struts2

This tutorial shows how to upload multiple files using single browse button in Struts 2 framework. There is another tutorial on Multiple Files Upload in Struts2 which uses multiple browse buttons for multiple file upload but this tutorial uses only one button for uploading multiple file upload in Struts2. You need to use just attribute multiple=”multiple” with <s:file/> tag for uploading multiple files using the single browse button. I won’t explain much details in this tutorial but if you need more explaination then you can go through another tutorial Multiple…

Continue

Multiple namespaces example in Struts 2

Introduction I will show you here how to create multiple namespaces in struts 2 web application. The benefit of namespace is the same file and action can be mapped to the multiple modules. The default namespace is “” – an empty string. A root namespace “/” is also supported. The namespace attribute subdivides action configurations into logical modules, each with its own identifying prefix. Namespaces avoid conflicts between action names. Each namespace can have its own “menu” or “help” action, each with its own implementation. While the prefix appears in…

Continue

Single file upload example in struts 2

Introduction File Upload is one of the common tasks of a web application and Struts 2 provides built-in feature for single file upload through FileUploadInterceptor. Interceptors are cross cutting concerns or common concerns like Logging. FileUploadInterceptor is configured in the struts-default package that we usually extend in Struts 2 package configuration. FileUploadInterceptor also provide options to set the maximum file size limit, allowed file types and extensions that can be uploaded to the server.

Continue

Multiple Files Upload example in Struts 2

Introduction File Upload is one of the common tasks of a web application and Struts 2 provides built-in feature for multiple files upload through FileUploadInterceptor. Interceptors are cross cutting concerns or common concerns like Logging. FileUploadInterceptor is configured in the struts-default package that we usually extend in Struts 2 package configuration. FileUploadInterceptor also provide options to set the maximum file size limit, allowed file types and extensions that can be uploaded to the server.

Continue

Integrate struts 2 in Liferay portlet

Liferay is a Open Source Content Management System and it’s popularity increasing day by day  but there are no much tutorials on this. Sometimes we find some examples but it may not work exactly the way have been written in the websites. Sometimes the tutorial steps have not been started from the scratch and it results confusion. I am going to give an example here step by step on how to integrate struts2 with liferay portlet or plugin project. I have extracted it from the Original Tutorial. There are two…

Continue

Integrate Spring 3, Struts 2 and Hibernate 3

Introduction This tutorial shows how to integrate Spring 3, Struts 2 and Hibernate 3 in the following example. In this example, Struts 2 will be used as a web framework and Spring 3 will be used as a core service. We will use ORM (Object Relational Mapping) framework Hibernate for our persistent layer to interact with database. We are going to use MySQL database for our example, you may use any database of your choice. You may also like to read: Struts 2, Spring 4, Hibernate 4 and Maven Integration

Continue