Hi all, I'm trying to list a directory's content(includes files and subdirectories). The problem is that I want to make a link to the files say a zip, so that they'll be able to download it.
Now, this directory is not under my web context, in another words, say my web application context is pointed to /usr/local/www/ , but I want to list the directory of /usr/jakarta/ and links to the files underneath it for download.
I have no problem genreate a page for displaying those files listing by use native File Object supplied with "/usr/jarkarta", I just have a problem when i need to make a html link. When I do
<a href="/usr/jakarta/tomcat4.zip"> Tomcat 4 </a>
the weblink interpreted as
http://mywebsite/context/usr/jarkarta/tomcat4.zip, how do I get over this? Again the directory is outside of my context, so getServletContext().getRealpath() doesn't really work for me when comes to make a html link. thanks a LOOTTTT.
Liming