Integrate Spring 3, Struts 2 and Hibernate 3

This tutorial shows how to integrate Spring 3, Struts2 and Hibernate 3 in the following example. You can see also Struts 2, Spring 4, Hibernate 4 and Maven Integration

Download the required jars for Spring from https://spring.io, Struts from http://struts.apache.org/download.cgi#struts2316 and Hibernate from http://hibernate.org/orm/downloads/

Create web application using Eclipse or any Java based IDE.

Please make sure you have the following list of jar files in your classpath.

spring, struts and hibernate integration examplespring, struts and hibernate integration examplespring, struts and hibernate integration example

Create Table in MySQL

 

Insert some data to the table

 

Create Hibernate configurations and Model class

Configuration file : hibernate.cfg.xml

 

Hibernate mapping file : Cds.hbm.xml

 

Model Class : Cds.java

 

Spring Service

 

Spring DAO layer

 

Struts Action class

 

Struts configuration file – struts.xml

 

Spring Configuration file – Application Context

 

Web deployment descriptor

 

View files – index.jsp and list.jsp

 

Thank’s for your reading. Please do not forget to leave a comment.

Soumitra

Software Professional, I am passionate to work on web/enterprise application. For more information please go to about me. You can follow on Twitter. You can be a friend on Facebook or Google Plus or Linkedin

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.