-
Applet - server folder contents
In an Applet is there anyway to get the contents of an images folder on the server - will use getImage to access selected file from folder. The files in the image folder keep changing and I have to modify code each time. If no solution, I will use a filelist.txt to do it but it would be best if code was general purpose.
Thanks,
RON C
-
Probably not. The only connection an applet will be able to make back to the server would probably be through an HTTP URL. Well one way to do it might be to make sure there's no index file in the dir with the images, that the server is set to allow indexing and then you could parse the HTML of the returned auto-generated index of files. Otherwise you'd need to update a file on the server containing the image data each time images are uploaded or deleted.
-
-
If a perl script or a servet was an option, then I guess this would not be a problem,
but I'm puzzled, how would a file listing help your applet with this ? I mean,
if the contents keep changing all the time how will you applet "know" what file(s) in
the list to use ? The thing is that if there is a one-size-fits-all logic in your applet
that enables selection from this ever-changing file list (without program modifications),
then what is the list for ?
eschew obfuscation
-
With a file list, the user can choose which image to work with. The user only selects one file but the files might change between usage.
I've never attacked servlets yet so I'd prefer to know without that. If can't do, I'll need to study servlets or make them update html every time they change the images. That seems like an accident waiting to happen - I'll be blamed either way.
Thanks,
RON C
-
...and its not even sure that your server hosts servlets... The easiest way may be to make a
little perl script that will send back a delimited string of filenames to your applet.
If you do that, they can't blame you, if you use the "updated html" solution they will
blame you the day it is not updated, and they will be in their full rights ...
eschew obfuscation
-
Thanks.
I offered the Perl script idea as first solution but their IT guy says it sould be self-contained. I'm going to tell them for what they paid, they can update the html - AT THEIR PERIL.
Thanks again.
RON C
-
Hah !! Serves them right.
eschew obfuscation
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks