Question
Develop an online file manager through servlets that do the following: - Creates a folder - Delete a folder. We need a display directory servlet,
Develop an "online file manager" through servlets that do the following:
- Creates a folder
- Delete a folder.
We need a display directory servlet, create folder servlet, and delete folder servlet. The display, without any parameter should display all top-level folders and should look like:
For the main page, all you need is the [New Folder] and the \ My Files. \ Documents and \ Temp are just dummy folders that do not go anywhere.
Clicking on .. should take the user to the parent folder, and clicking on Delete Folder should delete the current folder and all its subfolders, and take the user back to the parent folder.
Clicking on New Folder should let the user enter the name for a new folder, e.g.
[Implementation]
For this assignment you may NOT create any folder on disk. Instead, use a data model class like the following:
public class Folder {
Integer id;
String name;
Folder parent;
}
Then creating a new folder is simply creating a new object of this class, and all the other folder operations become operations on the objects of this class as well. For example, displaying the content of a folder is simply displaying the objects whose parent is the current folder object. This means we will also need a separate "Folder" class. Not to be confused with the Java File I/O class.
This assignment has to be done through JAVA SERVLETS on eclipse. These servlets should work together in order to successfully create a directory which can be browsed and the above functions should work.
Specifically, when requested without any parameter, the main page of the application should display all the top-level folders. For example: the New Folder \My Files Documents Temp A user may click on a folder to enter that folder, in which case the application displays the subfolders inside the selected folder. For example: My Files New Folder l Edit Folder l Delete Folder Folder A Folder BStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started