Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4252701

RFE: getCodeBase() and getDocumentBase() do not behave as documented

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.2.1
    • docs
    • generic
    • generic



      Name: rlT66838 Date: 07/08/99


      The API docs for the Applet class claim that the
      getDocumentBase() method returns "the URL of the document in
      which the Applet is embedded." What it actually seems to do is
      to return the URL of the directory in which the document resides.
      The actual behavior seems more in line with the method name (and
      more useful), but does not agree with the docs.

      Similarly, the docs for the getCodeBase() method claim that it
      returns "the URL of the applet itself." What it actually seems
      to do is to return the value of the codebase parameter from the
      applet tag if that was specified, or the same value as
      getDocumentBase() otherwise. Again, the actual behavior seems
      more appropriate than that described by the documentation.

      Version info:

      D:\work\JaMM_2.0>java -version
      java version "1.2.1"
      Classic VM (build JDK-1.2.1-A, native threads)

      D:\work\JaMM_2.0>java -fullversion
      java full version "JDK-1.2.1-A"
      (Review ID: 85379)
      ======================================================================

            shommel Scott Hommel (Inactive)
            rlewis Roger Lewis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: