We can add users by clicking on the Manage Users button.
We need to enter the following information for our user, a User ID , one or more
groups, and a password. The groups our user belongs to must match one of the
group names we used in the application's sun-web.xml deployment descriptor.
After entering this data and clicking on the OK button, we are now ready to test
our application's security.
After deploying our application and pointing the browser to a protected page
( http://localhost:8080/simplewebapp/admin/admin.jsp in our example),
the user is automatically directed to the application's login page.