By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,630 Members | 1,121 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,630 IT Pros & Developers. It's quick & easy.

Applet.getDocumentBase()

P: n/a
This is the stupidest thing I have ever seen. Java 1.2, 1.3, and 1.4.1, and
1.4.2 all define the Applet.getDocumentBase() method differently! How am I
supposed to get the directory of the document in which the applet is
embedded (like Java 1.3) using Java 1.4.2???
http://java.sun.com/products/jdk/1.2...tDocumentBase()

http://java.sun.com/j2se/1.3/docs/ap...tDocumentBase()

http://java.sun.com/j2se/1.4.1/docs/...tDocumentBase()

http://java.sun.com/j2se/1.4.2/docs/...tDocumentBase()
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
To clarify;

Java 1.2: Returns the URL of the document in which the Applet is embedded.
Java 1.3: Returns the URL of the directory of the document in which the
Applet is embedded.
Java 1.4.1: Returns the URL of the directory of the document in which the
Applet is embedded.
Java 1.4.2: Returns the URL of the document in which the Applet is embedded
Java 1.2 and Java 1.4.2 work one way (returning the URL of the Applet's HTML
Page). Java 1.3 and Java 1.4.1 work differently (returning the URL of the
directory that the Applet HTML is contained).
Obviously, this is a serious issue. We have coded an Applet that loads
resources from the directory. This Applet uses getDocumentBase() and is
deployed under Java 1.3. Unfortunetly, Java 1.4.2 users are unable to view
the Applet, as the getDocumentBase() method returns different results and
the Applet does not load the resources.


This is the stupidest thing I have ever seen. Java 1.2, 1.3, and 1.4.1, and 1.4.2 all define the Applet.getDocumentBase() method differently! How am I
supposed to get the directory of the document in which the applet is
embedded (like Java 1.3) using Java 1.4.2???
http://java.sun.com/products/jdk/1.2...tDocumentBase()
http://java.sun.com/j2se/1.3/docs/ap...tDocumentBase()
http://java.sun.com/j2se/1.4.1/docs/...tDocumentBase()
http://java.sun.com/j2se/1.4.2/docs/...tDocumentBase()

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.