Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between getDocumentBase() and getCodebase()

 
Mike Liu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Can anybody tell me the deffience between getDocumentBase() and getCodeBase().
Thank you.
 
Rob Ross
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Blatantly copied from javadoc...
getDocumentBase()
Returns an absolute URL naming the directory of the document in which the applet is embedded. For example, suppose an applet is contained within the document:
http://java.sun.com/products/jdk/1.2/index.html

The document base is:
http://java.sun.com/products/jdk/1.2/

getCodeBase()
Gets the base URL. This is the URL of the applet itself.
[ February 20, 2002: Message edited by: Rob Ross ]
 
Mike Liu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Rob, you know I am kind of new in java, can you give me one example on this. thank you again.
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mike
Welcome to the Java Ranch, we hope you’ll enjoy visiting as a regular however,
your name is not in keeping with our naming policy here at the ranch. Please change your display name to an appropriate name as shown in the policy.
Thanks again and we hope to see you around the ranch!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic