Strange behaviour of Applet.getImage(URL)

Discussion in 'Java' started by Chris Berg, Oct 27, 2005.

  1. Chris Berg

    Chris Berg Guest

    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
     
    Chris Berg, Oct 27, 2005
    #1
    1. Advertising

  2. Chris Berg

    Roedy Green Guest

    Roedy Green, Oct 31, 2005
    #2
    1. Advertising

  3. Chris Berg

    Chris Berg Guest

    Thanks. Not really helpful though, I'm afraid.

    Chris


    On Mon, 31 Oct 2005 10:12:43 GMT, Roedy Green
    <> wrote:

    >On Thu, 27 Oct 2005 17:12:00 +0200, Chris Berg
    ><> 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.
     
    Chris Berg, Oct 31, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kris
    Replies:
    2
    Views:
    520
  2. Trung Chinh Nguyen
    Replies:
    5
    Views:
    475
    Trung Chinh Nguyen
    Jul 30, 2006
  3. Thomas Fritsch
    Replies:
    2
    Views:
    1,060
    Andrey Kuznetsov
    Jul 27, 2006
  4. Lukasz
    Replies:
    10
    Views:
    772
    Andrew Thompson
    Aug 11, 2006
  5. Qu0ll
    Replies:
    28
    Views:
    776
    Qu0ll
    Nov 15, 2007
Loading...

Share This Page