Homework 2
CS520, Fall 2010

Due: Thursday, October 14

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]

[Online File Manager]

For this assignment, you are going to implement a simple online file manager. An online file manager allows users to store and manage their files online using a web browser. For functionality typically provided by an online file manager, you can check out some commercial offerings such as www.box.net. Of course, in this assignment you only need to implement a limited set of features as described below. Note that you must use proper MVC architecture in the implementation - in particular, scripting elements are not allowed in JSP pages; otherwise there will be a credit penalty of up to 30%. You do not need to use a database - the information about the files and folders can be stored in the application scope.

1. (40pt)  Folder Display.

When the application is requested without any parameter, it displays the content of the top level folder, which we'll refer to as the root folder. For example:

CS520 Online File Manager

Current Folder: /
Upload File | Create New Folder

When a user clicks on a folder, the content of that folder should be displayed. For example:

CS520 Online File Manager

Current Folder: /Folder1
Upload File | Create New Folder

Note that

2. (20pt) Create New Folder.

A user may click on "Create New Folder" to create a new folder under currently selected folder. For example:

CS520 Online File Manage - Create New Folder

Current Folder: /Folder1
Please enter the name of the new folder:

Note that

3. (30pt) File Upload and Download.

A user may click on "Upload File" to upload a file to the currently selected folder. For example:

CS520 Online File Manage - File Upload

Current Folder: /Folder1
Please select a file to upload:

And a user may click on the name of a file to download it.

Note that

4. (20pt) Rename.

A user may click on "Rename" to rename a file or a folder. For example:

CS520 Online File Manage - Rename

Current Folder: /Folder1
Rename:

Note that

[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. After deployment you should check your application on CS3 and make sure it runs properly.