Lesson 2.4: Install and run the sample
After authentication is configured, you can install and run the sample application.
Creating a shared library for the EmployeeData.jar file
Procedure
- In the WebSphere Application Server administrative
console, open the Shared Libraries page.
Click.
- Choose the cell scope.
- Create
the shared library. Click New. Enter EmployeeManagementLIB as the Name. Enter the path to the EmployeeData.jar in the classpath, for example, samples_home/WASSecurity/EmployeeData.jar.
- Click Apply.
Installing the sample
Procedure
What to do next
Running the sample application
Procedure
- Run the management.jsp file.
In a web browser, access http://<your_servername>:<port>/EmployeeManagementWeb/management.jsp.For example, you might use the following URL: http://localhost:9080/EmployeeManagementWeb/management.jsp.
- Provide authentication to the application. Enter the credentials of the user that you mapped to the webUser role. By default, this user role is mapped to all authenticated users. Type any valid user name and password, such as the administrative user name and password.A page to display, add, update, and delete employees displays.
- Display
employees. Click Display an Employee. Enter emp1@acme.com as the email address, and click Submit. A message displays that the employee cannot be found.
- Add an employee. click Add an Employee. Enter emp1@acme.com as the email address, enter Joe as the given name, and Doe as the surname. Click Submit. A message displays that an employee with the emp1@acme.com address has been added.
- Display the new employee.
Click Display an Employee. Enter emp1@acme.com as the email address with empty fields for the first and surnames, and click Submit. A message displays that the employee has been found, and the correct names are displayed in the given name and surname fields.
- Delete the employee.
Click Delete an employee. Enter emp1@acme.com and click Submit. A message is displayed that the employee has been deleted.
Results
SystemOut O [KeyStoreLoginModule] initialize: Successfully loaded key store
SystemOut O [KeyStoreLoginModule] login: entry
SystemOut O [KeyStoreLoginModule] login: user entered user name: manager
SystemOut O Print out the certificates:
...
Lesson checkpoint
You installed and ran the sample application.