| Course Teaching | You are Offering Professional Course | Locality Gandhipuram |
We can integrate any struts application with hibernate. There is no requirement of extra efforts.
In this example, we going to use struts 2 framework with hibernate. You need to have jar files for struts 2 and hibernate.
Example of Hibernate and struts2 integration
In this example, we are creating the registration form using struts2 and storing this data into the database using Hibernate. Let's see the files that we should create to integrate the struts2 application with hibernate.
index.jsp file to get input from the user.
User.java A action class for handling the request. It uses the dao class to store the data.
RegisterDao.java A java class that uses DAO design pattern to store the data using hibernate.
user.hbm.xml A mapping file that contains information about the persistent class. In this case, action class works as the persistent class.
hibernate.cfg.xml A configuration file that contains informations about the database and mapping file.
struts.xml file contains information about the action class and result page to be invoked.
welcome.jsp A jsp file that displays the welcome information with username.
web.xml A web.xml file that contains information about the Controller of Struts framework.
Step once At Fu-VISION for Faster growth, Better salary and make your career Bright!
PLS CONTACTFOR MORE DETAILS CALL IMMEDIATE: 9360029290 / 9003206648
Fu-VISION TRANING SOLUTION PVT LTD
COIMBATORE: HEAD OFFICE
NO: 96-A SREE NAGAR,
PALANI AANDAVAR ILLAM, 1nd FLOOR
OPP KRISHNA SWEETS,
AVINASHI ROAD, PEELAMEDU,
HOPES COLLEGE BUS STOP ,
COIMBATORE-641004
COIMBATORE: BRANCH
2nd FLOOR, SAI TOWERS,
DIAGONALLY OPP TO GANGA-YAMUNA-KAVERI THEATRE
ABOVE BAJAJ MOTORCYCLES,
GP (100FT ROAD)
COIMBATORE-641012
MAIL ID: [email protected]
Website:www.fu-vision.com / www.fu-vision.in