Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Directory Traversal

 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was wondering if there is a dynamic way to travers directories on my web server.
What I have is a bunch of images catagorized in folders, and I would prefer not to have to statically define each directory inside my javascript code to get to the images.
Is there a way using javascript to get directory and file names dynamically so to speak.
Thanks
 
Sri, Shankar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your page is a JSP or a Servelet, you can generate javascript on the fly to acheive this. For example - you can generate an array of objects that contain information about the images...
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, if I do that then I might as well just build an Applet Image Loader. I was hoping to avoid JAVA for this project.
But thanks for the advice.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is there any pattern to the names of the images??
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, not really. Nor is there a pattern in the Directory Names. I have decided that I am probably going to have to put all the images in one directory, and do like img00001, img00002, etc. But I have like 3500 images and I was hoping not to have to go through and rename all of them. What a pain.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you can use php or asp, i will send you to a place to help. I belive that it can be done with them and that would get you away from the applet.
Eric
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure, point me in the right direction. I'll take any help at all.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic