Frameworks| Hibernate| Struts| JSF| JavaFX| Ajax| Spring| DOJO| JDO| iBatis| Questions?

 

 

 

 

 

 

 

 

 

 

 

 

 

Search Tutorials:
 

Software Solutions and Services
 

 
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification
  Java Applet
Questions
Comments
 
Integrating MyFaces , Spring and Hibernate 
 

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 password.

So, let's start developing Login and Registration application using Hibernate, Spring and MyFaces:

  1. 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.
       
  2. Application Architecture
    In this section we will explain you the architecture of the application and the different components that makes up the layers.
       
  3. 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.
        
  4. 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.
     
  5. 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
  6. Developing 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
  7. 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 architecture.

    Integration Tier of the Application
  8. Implementing 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
  9. Integrating JSF, Spring and Hibernate
    In this section we will explain you the process of Integrating Spring with JSF (Java Server Faces) technology.
      
  10. Integrating presentation layer
    In this section we will learn about configuring the presentation layer.
      
  11. Integrating 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.
      
  12. Downloading the full code of this application
    You can download the full code of the application.
       

                          

» View all related tutorials
Related Tags: c hibernate web spring application io this app ie add nat to bi e il it section li in ca

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

4 comments so far (
post your own) View All Comments Latest 10 Comments:

wonderful tutorial serves all my needs

Posted by prasanth on Wednesday, 12.3.08 @ 02:02am | #82308

I found this tutorial a good catcher and learner for the JSF, Spring and Hibernate.

Keep it up, Dude

-Ravi

Posted by Ravi on Wednesday, 02.20.08 @ 14:09pm | #49195

Thanks, as someone who is new to Spring, JSF and Hibernate, I've found this a very useful and practical tutorial. Good Stuff!!!

Posted by brucem on Friday, 11.2.07 @ 01:57am | #35363

Hey i had the next error, when i tried to run the aplication.

Thanks for your Help...

javax.servlet.ServletException: Servlet.init() for servlet Faces Servlet threw exception
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Unknown Source)

root cause

java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
A typical config looks like this;
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>

javax.faces.FactoryFinder.getFactory(FactoryFinder.java:93)
javax.faces.webapp.FacesServlet.init(FacesServlet.java:91)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Unknown Source)

Posted by gilbert on Thursday, 08.23.07 @ 01:30am | #23933

Training Courses
Tell A Friend
Your Friend Name
Website Designing Services
 
Web Designing Packages From $150!
 
Website Designing Company Web Hosting
 
Website Designing Quotation
 
Search Tutorials:

 

 
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Flex Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.