Homework Assignment 6

Deadline: 6/6 (during/after class)

Note: For both of the exercises below you are asked to write a small JSP application. The applications are expected to store some information on the server. However, you do not have to worry about permanently storing this information (e.g. on a database). Is is enough if the application works correctly as long as the server is up, even if everything is lost once the server shuts down. You are expected to submit the jsp file(s) implementing your solution.

1. Message Service

Build a simple server-side application which allows users to do the following:

  1. Sign up for an account by choosing a username, password and giving their real name. Usernames should be unique (this must be checked).
  2. Login to the system using this account
  3. Look at a list of all users (usernames + real names)
  4. Send a short message to one of the users, using the username as the recipient's address
  5. Look at a list of all messages the user has sent or received
  6. Log out of the system

2. Tic-Tac-Toe

For this exercise you need to make a server-side version of the Tic-Tac-Toe game of a previous homework.

  1. The first user to visit the site should be given the chance to choose X or O and enter his/her name.
  2. The second user then chooses the other side and enters his/her name.
  3. The game can now start. At each turn your site displays to the users the state of the board.
  4. Only the user who is currently supposed to play is displayed a form that allows him/her to do so.
  5. The other user is given a "Refresh" button, which he/she can click to see if her turn has arrived.
  6. Your program should reject illegal moves.
  7. It should also be able to detect if a player has won.
  8. Finally, both players have the possibility of reseting the game at any time, using a special button.

Note: Here are some screenshots to give you an idea of what is expected for these programs.