The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
May 2000



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.



Posted by Ram on June 19, 2001 at 6:37 PM

> > if i want to get the url of the particular page the i use getdocumentbase() this is when i am applet but when i am using Frames what method should i use to get url of page

> Am I correct in assuming that your application wants to talk to an URL ? If so you can use some method in either URLConnection/HTTPURLconnection of If I am wrong in assuming the above manner, could you elaborate the question how did you get the page in to the hands of a frame.

Applets only can be embedded in a web page and getDocumentBase() is used to get URL of that page.

If you are doing a http connection from an java application you have to know the URL and use URL object from

Hope this will help.


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us