Archive for the ‘First Example Richfaces’ Category

Login and Registration is one of the most required module of any project. This tutorial explains how to implement login and registration functionality in your JSF project. The example application in this tutorial is named “RichLRApplication” which uses RichFaces as JSF implementation and library of rich featured components. We have selected RichFaces for the application because it provides a large number of useful components which are enough to start with. RichFaces components are AJAX enabled which increases the responsiveness of the application.

In this application, Login page appears first in front of the user. User fills the login and password information and enters into the application for further actions. After successful user login, user can edit and save its profile information, change password and logout itself. If user is not able to login to the application i.e. forget the password, it can get password by clicking the link “Forgot Password?” in the login page itself. User is asked for the email id, which if valid and registered then password is sent to the email id. User can now login to the application by checking the mail and getting the password from there. If any new user wants to register itself in the application, there is a link “Register Here” for it. This link takes the user to the registration page where user can fill the required information and submit the information. User can change its password after successful login to the application by entering the old password and new password.

This Login & Registration example application provides:

  1. User Login
  2. User Registration
  3. Retrieve password to the registered email id
  4. Edit User Profile Information
  5. Change User Password
  6. User Logout

Application Development Steps:

To understand the application easily, we have divided the process in the following steps. These steps will let you understand the development of directory structure for the application, creating database structure, developing presentation layer through JSP, creating managed beans and running the application.

  1. Developing directory structure for the application
  2. Developing database for the application
  3. Creating configuration files
  4. Developing JSP files
  5. Creating managed beans
  6. Creating a properties file
  7. Registering managed bean and defining navigation rules
  8. Running the application

You can also download full source code for this application in zipped format. Unzip the source code and deployed it to the Tomcat server.
Download full Source Code

You can also download the database script to create the database required for the application. Execute the script and database will be created automatically.
Download Script for database

  Our example application uses:

  1. JSP pages for presentation purpose
  2. JavaBean to handle model data and
  3. Configuration files for defining managed bean, navigation rules, controller servlet.