reset password
Author Message
Phanit
Posts: 10
Posted 17:54 Oct 12, 2010 |

In the first part of hwk2, we have to display the content of the top level folder, which we refer to as the root folder. I am not sure which folder is suppose to be the root / top level folder.

Thanks for help.

victormejia
Posts: 40
Posted 18:28 Oct 12, 2010 |
Phanit wrote:

In the first part of hwk2, we have to display the content of the top level folder, which we refer to as the root folder. I am not sure which folder is suppose to be the root / top level folder.

Thanks for help.

 

I create the root folder in my init() function in the main servlet. But now I'm wondering about this too. The way I'm doing it is i have a main FileManager servlet, so when a certain folder is requested it will look like this

localhost:8080/cs520/FileManager?folder=folder1

I'm not sure if we are supposed to create physical folders under WebContent so that it will look like this:

localhost:8080/cs520/FileManager/folder1

cysun
Posts: 2935
Posted 20:05 Oct 12, 2010 |

Generally speaking, the folders managed by your online file manager should not correspond to physical folders (because then you'll run into limitations of the physical disk and/or your operating system); however, for this simple assignment, it's OK if they do.

If your folders correspond to physical folders, then the root folder is WEB-INF/files.

If your folders are virtual, then the root folder is of course virtual, and all folders and files that do not have a parent folder belong to this folder.