| What about subdirectories? Doesn't the line file = file.replaceAll("/", ""); cram the link we type in the browser into a long string.
For example, if I were to have a file.fil under folder. Wouldn't localhost:80/Folder/file.fil make the file name Folderfile.lif?
I tested it out and it throws IOExceptions and of course, the file Folderfile.fil doesn't exist.
But overall, this is a helpful tutorial. |