• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

here's the task i'm trying to accomplish.. how to read directories and files withJSP

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here's the task i'm trying to accomplish.. how to read directories and files with JSP
I need to write a JSP page that will check for new folders and if there is a new folder, then it will save that new folder name to a database. Then it will read the subfolders in that main folder and save those names to a database, and then it will read all the files in the subfolders (image files) and save those filenames to a database.
for example, someone could ftp a folder full of .jpg images, subdivided into a few subfolders, and then go to a jsp that gathers all the data from this new folder.

Is this possible in jsp?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is way too much code to do in a JSP expecially since you expect it to hold data about files and directories for an extended period.
You should put that functionality in a separate class, so you will be able to test it off-line.
For reading files and directories, look at the methods in java.io.File.
Bill
 
If you're gonna buy things, buy this thing and I get a fat kickback:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic