This tutorial shows you how to create a simple JSF application using the Workshop for JSF plug-in for Eclipse.
The sample application used in this tutorial is a web application for an IT solutions company. It allows registered users to download various softwares. In this tutorial, you will develop one of the modules "Registration and Login" of the web application.
For new users, the application requests the user to register first. During registration, the user is required to provide userId, password, full name and contact details like address, city, zipcode, phone number, etc. The userId must be unique and maximum of 8 characters. The password must be a four digit number ranging between 1000 and 9999.
Registered users provide their userId and password to login. The application verifies userId and password. If it is valid, the user will be forwarded to the page for downloading the software.
The following are the software components of the sample web application.
Displays Login form for userId and password. It submits request to LoginBean.validate action. If the userId and password are valid then the application will display home.jsp page otherwise it asks to re-login.
Displays registration form for entering information like userId, password, name, contact details, etc. It submits the request to UserBean.registerUser action. On successful registration, the application will navigate to home.jsp page.
Shows Welcome message and link to download Workshop.
CSS file to customize appearance of JSP pages.
Helper class that retrieves messages from application resource bundle.
Provides static method to update application locale at run-time.
Represents transient data store that maintains list of registered users.
Managed Bean responsible for validating userId and password.
Serializable bean having user information like userId, password, full name, contacts details, etc. It implements the method getRegisteredUser( ) to store user information in the database.
Holds contact information like address, city, state, zipcode, country, office phone number and home phone number.
This is notified when servlet-context is initialized; it creates an instance of DataStore which stores user information ( UserBean objects) and it puts it in application scope.
You will create workshop-JSF-tutorial project from the sample web application which contains support files (.java and .jsp files) and resources (images, .css file) for JSF application. Using the resources and steps described in this tutorial, you will learn how to develop JSF applications using Workshop.
Click one of the following arrows to navigate through the tutorial: