Tutorial presented here discusses the steps to configure Hibernate, Spring and MyFaces to use MySQL Database to build real world User registration and login application. This is a sample user registration and login application where new user can create a
Integrating MyFaces , Spring and Hibernate
Learn Configuring Hibernate, Spring and MyFaces (JSF):
Tutorial presented here discusses the steps to configure Hibernate, Spring
and MyFaces to use MySQL Database to build real world User
registration and login application. This is a sample user
registration and login application where new user can create an account with the
system. Existing users can access the website by providing their user name and
So, let's start developing Login and Registration application using
Hibernate, Spring and MyFaces:
- About the Tutorial
This tutorial explains the integration of Hibernate
and Spring Frameworks into JSF (MyFaces) and building a real world web
application. Integration of these three makes a solid framework for the
development of web application.
In this section we will explain you the architecture of the application and
the different components that makes up the layers.
- Downloading MyFaces and creating web application
In this section we will learn how to create web application for our login
and registration example program. Alternatively you can also download the
integrated web application with source code and library files.
- Adding Spring and Hibernate Capabilities
In this section we will add Spring and Hibernate Capabilities to our web
application. So for this, we will have to add the spring and hibernate
libraries and configuration files to the web application.
- Setting up MySql database and creating tables
In this section we will create database and table into
MySQL database. Table created here will be used in sample application.
Developing Presentation Layer
Login and Registration form and backing beans
This application starts from user login page. The authenticated user set
the user name and password in the appropriate field and is carried to the
next page with a message welcoming the user. If the user doesn't set the
correct entries then it flashes a message in the same page to indicate that
either the user name or password is incorrect.
Developing Business Layer
- Writing Business Objects
In this section we will develop the objects of business logic tier.
Business logic tier referrers to the mid tier of 3-tier web application
Integration Tier of the Application
Integration tier with Hibernate
In this application we are using Hibernate to implement data access
layer. Hibernate is an open source O/R mapping framework that handles all
the persistence logic.
Wiring up everything
JSF, Spring and Hibernate
In this section we will explain you the process of Integrating Spring
with JSF (Java Server Faces) technology.
- Integrating presentation layer
In this section we will learn about configuring the
Business Logic/Integration Tier
In the business logic tier web have created business objects, business
services and now we are going to integrate them using Spring framework.
- Downloading the full
code of this application
You can download the full code of the application.