File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes INCLUDE js based on a dir's contents? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "INCLUDE js based on a dir Watch "INCLUDE js based on a dir New topic

INCLUDE js based on a dir's contents?

chris scanlon

Joined: Nov 20, 2005
Posts: 1
Any ideas on how to construct an hlml page that uses an INCLUDE statement to build the content based on a folder's contents (html files). I want to avoid having to manually write individual INCLUDE statements for each file in a directory!! (I've never seen an INCLUDE statement that references a directory of files � just individual filenames � But I'm a relative newbie).

Background: I maintain a web site that houses procedural content (now about 2900 files comprising 446 procedures). The procedures were originally long, rambling pages of content. Users constantly complained about not being able to locate information.

So we chunked the content using basic Information Mapping principles. All chunks relating to a procedure are housed in a unique directory on the server. A �Table of Contents� page for each procedure now serves as the portal into the new chunks. The TOC pages are available to the user thru the site's home page. This restructuring has greatly improved the site, however we now lack a way to produce a printable version of an entire procedure thru one link. I would like to give users the ability to print/view the entire procedure on the Table of Contents page. Hence my interest in the INCLUDE statement (perhaps I should be considering another solution?).

I have intermediate(+) experience with html, basic knowledge of js and no experience with other scripting languages (although I can muddle my way thru most anything)

Thanks in advance for any direction/help!
I agree. Here's the link:
subject: INCLUDE js based on a dir's contents?
It's not a secret anymore!