Design .jsp (or other) to dynamically create page based on items found in directory
Posted on 2005-04-05
I am a Solaris admin, but not a web designer (have had a little experience...very little.)
We are running Apache 2.0.35 on Solaris 5.8.
I would like to create a page (.jsp, or whatever) that dynamically looks at the list of items within the “../htdocs/subdir” directory within Apache, and creates a page on the fly with those items as links to that file/dir.
The reason being is, we want to be able to have scripts copy directories full of “txt” documents into “../htdocs/subdir” without us having to hand re-write the web page with the links.
# ls ../apache2/htdocs/servers
Hi! Welcome to the admin webpage! Click any of the links below...
...and clicking differentDoc.html brings up that page, clicking document.txt brings up that doc, and clicking on the link for serv1 or myserv just takes you into that dir (the subdir does not need formatting, per se’-as it will just be .txt docs the person can click on.)
A million thanks