Struts2.2.1 and hibernate integration application
Posted on: March 4, 2011 at 12:00 AM
In this application, you will see how to integrate struts2.2.1 and hibernate.

Struts 2 Hibernate Integration Application

This section contains the demo of how to integrate Struts2.2.1 with hibernate. You will also see that how to connect struts application to database using hibernate.

Introduction

In this demo application, a registration form is given. On successful registration, it will insert value in the database table and show the added value in the below table.ADS_TO_REPLACE_1

Database table schema

The database table schema is given below :

Table name : userinfoADS_TO_REPLACE_2

Application flow

The application flow is shown through snap shots below :ADS_TO_REPLACE_3

Directory Structure

Jar file usedADS_TO_REPLACE_4

The first page which appear after executing application is :

If form values not filled properly :ADS_TO_REPLACE_5

When value filled correctly it will add the value and display it into below table :

ADS_TO_REPLACE_6

MODULES

Given below the module used in the application with its code & description  :

index.jspADS_TO_REPLACE_7

AddInforForm.jsp

struts.xml 

AddInformation.javaADS_TO_REPLACE_8

InformationAction.java

InformationDAO.java

hibernate.cfg.xmlADS_TO_REPLACE_9

HibernateUtil.java

Download The Source Code

Related Tags for Struts2.2.1 and hibernate integration application :

Advertisements

Ads

Ads

 
Advertisement null

Ads