![]() |
![]() |
![]() |
![]() |
In this step, we will create server configurations, deploy and run the JSF application.
Our application uses the DataStoreBean class which should be available in application scope. You have been provided a Servlet Context Listener called ContextListener which registers an instance of DataStoreBean to ServletContext at application start up.
Create a new package called listeners and copy the file ContextListener.java from the folder workshop-JSF-tutorial/web/Resources folder to listeners package.
Workshop has the ability to run and debug applications on most of the popular web containers that are in use today. Before you can run this sample application, you must have a server installed.
The screen that displays next depends on the type of server that you have chosen. This screen allows you to configure your server. Choose the server settings and click Next to continue.
To run the application, right click on the register.jsp file name in the AppXplorer or Package Explorer view and choose Run As > Run on Server from the submenu.
Click Finish.
Once the server started successfully, Workshop opens register.jsf page in browser window.
The application first performs the data validation based on the rules defined for form fields. If you try to submit the data without filling in the Password field, you will get an error response.
If you enter User ID of value less than 4 characters and Password of value less than 1000, then you will get an error response.
On successful registration, the user will be forwarded to the home.jsp page.
Click one of the following arrows to navigate through the tutorial:
![]() ![]() |