Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2005

Tip: Looking for answers? Try searching our database.

Strange behaviour of Applet.getImage(URL)

Thread view: 
Chris Berg - 27 Oct 2005 16:12 GMT
In my SIGNED applet, I try to get an image:

  String pImage = "/images/myimage.gif";
  Image image = getImage(getDocumentBase(), pImage);

In this particular case, the document base is

  https://doc_domain/path/

(notice the 's' in https)

The codebase is a different domain:

 http://code_domain/path/   (no 's')

Now, when the applet runs, something quite unexpected happens: the
applet first tries to fetch the image from the server at
code_domain!!!. In its web log, i can see that it has tried to fetch

 http://code_domain/images/myimage.gif

then, a second later, it fetches

 http://doc_domain/images/myimage.gif

It has no effect to actually put an image file on the codebase server.
The image eventually diplayed is the right one - the one from the
doc_domain server.

I've tried it on several Java versions, and it appears to not do it on
versions 1.3 or lower, though I'm not quite sure about it.

Chris
Roedy Green - 31 Oct 2005 11:12 GMT
On Thu, 27 Oct 2005 17:12:00 +0200, Chris Berg
<spam.spam.eggs@nd.spam> wrote, quoted or indirectly quoted someone
who said :

>   https://doc_domain/path/
>
>(notice the 's' in https)
see http://mindprod.com/jgloss/ssl.html
for the gotchas.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Chris Berg - 01 Nov 2005 00:03 GMT
Thanks. Not really helpful though, I'm afraid.

Chris

>On Thu, 27 Oct 2005 17:12:00 +0200, Chris Berg
><spam.spam.eggs@nd.spam> wrote, quoted or indirectly quoted someone
[quoted text clipped - 5 lines]
> see http://mindprod.com/jgloss/ssl.html
>for the gotchas.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.