This example application is like the login web application except that after login it displays the welcome message on the login screen using AJAX. It can be run here. It is defined by the following:
The login-ajax web application is defined by the following files:
Java classes (Source Packages/com/corejsf/):
JSF pages (Web Pages/):
The configuration files are the same as the login web application.
The index.xhtml file for this application invokes AJAX as the action for the command button. When the command button is clicked, JSF is still used to update the user bean. Instead of bringing up a new page, the welcome greeting is just added to a tag in index.xhtml. This requires
Although the use of AJAX in login-ajax is not complicated, a full explanation of its effects will have to wait until CoreJSF Ch. 10.