baumans pascal wrote:
> 
> ok but I have 250 text files in this directory and I want to create a html
> link on each of them, in this way I'll have the 250 link on a html page and
> those 250 files will be availlabe for downloading ...
> so Is there another way to do thoses links on a jsp page ?

try {
 File directory = new File("C:\directory");
 if (directory.isDirectory()) {
  String[] filenames = directory.list();
  //or
  // File[] file = directory.listFiles();
  /*
then, you can write the 
<a href="<%=filename%>"><%=filename%></a>
link.
  */
  }
}
catch(IOException ioex) {}

so you can do this with JSP's, but...

If you want the user to download the txt files, you have to tell the
server (Apache? Tomcat-standalone?) where to find these files by
creating an Alias directive or something else.

Hope it helps.

-- 
Arnaud Vandyck <http://www.ressource-toi.org/>

Reply via email to