Solved

Display image from full path

Posted on 1999-01-19
5
244 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 

Expert Comment

by:blueben
ID: 1859074
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
ID: 1859075
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
ID: 1859076
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
ID: 1859077
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
ID: 1859078
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

739 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