Login and Logout Features of YourCo

To login: From the Home page, click Employee Center on the top navigation menu.

To go from the YourCo home page to the Employee Center, you must be a YourCo employee. If you haven't logged in yet (or if you have logged out), you'll get a Login page to enter your username and password. We have set up three of the people in the SAMPLE database as valid YourCo employees. You must login in as one of these three employees.

Before an Employee Center page is displayed, the Center servlet checks for a SessionBean. If one doesn't exist, it routes you to the Login page, login.jsp, which calls the Login servlet.

The Login servlet creates the SessionBean to keep track of the YourCo user information. When you log in, the servlet checks to see if you entered a valid username and password. Then, it loads your data form the USER and EMPLOYEE tables into the SessionBean.

  • (locations are relative to <was_root>/hosts/default_host)
  • Look for the Login Java files in WSsamplesIDB_app/servlets/WebSphereSamples/YourCo/Login.
  • Look for the JSPs in WSsamplesIDB_app/web/YourCo/Login.

To logout: From the Employee Center, click Logout on the bottom navigation menu.

When you log out, the Logout servlet removes the SessionBean. You can log in as on of the other valid employees and try other features of the Employee Center.

  • (locations are relative to <was_root>/hosts/default_host)
  • Look for the Logout Java files in WSsamplesIDB_app/servlets/WebSphereSamples/YourCo/Login.
  • Look for the JSPs in WSsamplesIDB_app/web/YourCo/Login.