Homework 2
CS520, Spring 2010

Due: Thursday, April 22

Please upload your files to CSNS. The files should include all the source code, documentation (if any), and an HTML file hw2.html which contains a link to your application on the CS3 server. Note that file uploading will be disabled automatically after 11:59PM of the due date, so please turn in your work on time.


[Readings]

[Wiki]

For this assignment, you are going to implement a simple wiki.

1. (10pt) When the application is requested without any parameter, it displays a pre-created default wiki page. For example:

Home | Edit | Revisions

CS520 Wiki

Note that the links Home, Edit and Revisions should appear on all wiki pages, and clicking on the Home link should take the user to the default page.

2. (20pt) Each wiki page is uniquely identified by its path. When a user requests a page that does not exist, the application should let the user to create the page. For example, suppose a user makes a request to http://localhost:8080/wiki/content/foobar, and the page /content/foobar does not exist, the application should display:

Home
The page /content/foobar does not exist. You may create the page yourself:


3. (20pt) A user may edit any wiki page, including the default page, by clicking on the Edit link on the wiki page, e.g.

Home
Edit page /content/Default:

Note that each edit of a page creates a new revision of the page, and the application should keep track of all the revisions for each page.

4. (20pt) When a user clicks on the Revisions link on a wiki page, the application shows the revision history of the page, e.g.

Home
Revision history of page /content/Default:

5. (15pt) A user may click on a revision to see that particular revision, e.g.

Home | Revert to This Revision
Page /content/Default, Revision 2.

CS520 Wiki

6. (15pt) Clicking on Revert to This Revision should revert the page back to the revision that is displayed. Note that reverting should be implemented as creating a new revision that is identical to the selected revision. In other words, you should never delete any revisions.

[Deployment on CS3]

To receive any credit at all for this assignment, you must deploy your application on the CS3 server. If you are using Dynamic Web Project in Eclipse, deployment only takes two simple steps:

Note that subfolders must be preserved during file transfer.