To run the web client, follow these steps:
Open a web browser.
Enter the following URL in your web browser:
The login form displays in the browser, as shown in Figure 25–8.
Enter a user name and password combination that corresponds to a user that has already been created in the file realm of the Enterprise Server and has been assigned to the group of TutorialUser.
Click the Submit button. Form-based authentication is case-sensitive for both the user name and password, so enter the user name and password exactly as defined for the Enterprise Server.
If you entered My_Name as the name and My_Pwd for the password, the server returns the requested resource if all of the following conditions are met:
There is a user defined for the Enterprise Server with the user name of My_Name.
The user with the user name of My_Name has a password of My_Pwd defined for the Enterprise Server.
The user My_Name with the password My_Pwd is assigned to the group of TutorialUser on the Enterprise Server.
The role of TutorialUser, as defined for the application, is mapped to the group of TutorialUser, as defined for the Enterprise Server.
When these conditions are met, and the server has authenticated the user, the application will display as shown in Figure 25–9.
Enter your name and click the Submit button. Because you have already been authorized, the name you enter in this step does not have any limitations. You have unlimited access to the application now.
The application responds by saying “Hello” to you, as shown in Figure 25–10.
For additional testing, close and reopen your browser, enter the application URL, and enter a username and password that are not authorized to see the login error page generated.
For repetitive testing of this example, you may need to close and reopen your browser. You should also run the ant clean and ant undeploy commands to ensure a fresh build if using the Ant tool, or select Clean and Build then Undeploy and Deploy if using NetBeans IDE.