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:
- Sign up for an account by choosing a username, password and giving their real name. Usernames should be unique (this must be checked).
- Login to the system using this account
- Look at a list of all users (usernames + real names)
- Send a short message to one of the users, using the username as the recipient's address
- Look at a list of all messages the user has sent or received
- 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.
- The first user to visit the site should be given the chance to choose X or O and enter his/her name.
- The second user then chooses the other side and enters his/her name.
- The game can now start. At each turn your site displays to the users the state of the board.
- Only the user who is currently supposed to play is displayed a form that allows him/her to do so.
- The other user is given a "Refresh" button, which he/she can click to see if her turn has arrived.
- Your program should reject illegal moves.
- It should also be able to detect if a player has won.
- 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.