aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Directory Traversal Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Directory Traversal" Watch "Directory Traversal" New topic
Author

Directory Traversal

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

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


GenRocket - Experts at Building Test Data
Sri, Shankar
Greenhorn

Joined: Jul 23, 2002
Posts: 7
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

Joined: Jul 11, 2001
Posts: 15300
    
    6

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

Joined: Nov 08, 2001
Posts: 15376
    
    6
is there any pattern to the names of the images??
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

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

Joined: Nov 08, 2001
Posts: 15376
    
    6
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

Joined: Jul 11, 2001
Posts: 15300
    
    6

Sure, point me in the right direction. I'll take any help at all.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Directory Traversal