Solved

Display image from full path

Posted on 1999-01-19
5
238 Views
Last Modified: 2013-12-25
I have graphic images on several servers, and in some cases in several directories on one server.

My wish is to point to and display the graphic file, for instances http://members.spree.com/SIP/kraphic/DigitalData/26/DSC00003.jpg.

In my applet I open a text file that has a list of urls such as http://members.spree.com/SIP/kraphic/Halloween98/90141919.jpg and the url above.
My list can have as many as I desire.

I read the list, and place the list into a vector.

I wish now to traverse the vector and display the images.

The big problem for me seems to be that I don't have the applet in the same directory as the image files, but I don't want to have to have the applet in the same directory as the image files.

Is this possible ?

Kraphics
0
Comment
Question by:kraphics
5 Comments
 

Expert Comment

by:blueben
Comment Utility
you need to have the applet in the same directory so either put a copy of it in each image directory or sort out your image directories into one large one
0
 
LVL 10

Expert Comment

by:MasseyM
Comment Utility
1) What kind of server are you running on?
2) what is a vector?  Do you mean an array?
3) Do you want to display the picture all on the page or in a "slide-show" manner.
4) What is the applet for?

0
 

Author Comment

by:kraphics
Comment Utility
Blueben, part of the problem is that the server where most of my images is does not support applets. I can only put files of type htm, jpg, or gif on it.

This only reinforce the ideal that there should be a way to refference a image file, and it's full path.

There must be a way to use an image without the applet being in the same directory.

My main server is an NT server, but most of my images are on the other server that does not support applets, but you see with as many images that I have, and plan to archive I have a need to store the images in seperate directores to help catalog them.

If I ever solve this initial problem I will store the full URL of each image in a database which will be searched based on the request. To do this I will need to extract the string from the database table and place it into the applet code.

A vector is like an array in that it stores related data, but more importantly the vector does not need to be initialized at any size, ant the vector can grow or shirnk as needed.(a VECTOR can also be used to store data of different types)

I am currently able to store and retrieve the image URLs to and from the vector, but I can't find a way to convert the string into a URL.

I tried getImage, but it does not work.

I tried to use "valueOf", but this also generates an error, and it should not. The data type "String" should support "valueOf", but I get an error.

MasseyM, I would like to use the applet in a slide show manner, but if I get it to work I will also use it to display multiple images on a page.
0
 
LVL 1

Accepted Solution

by:
ptruman earned 100 total points
Comment Utility
open a browser window targetted to your chosen URL,
restrict window size to 10 x 10 BIGGER than your image.
Thats the only way (as Java will want images in the same place)

0
 

Author Comment

by:kraphics
Comment Utility
ptruman, If I open an html page at lets say

http://www.kraphics.com/imaginethis.html

and lets say that I also put the applet at the same place

http://www.kraphics.com/jpgapplet.class

what must I put into html page to point to images, lets say

http://members.spree.com/SIP/MyImages/see.jpg

                  and

http://members.spree.com/SIP/MyImages/26/this.jpg

Thanks
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now